(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

"Define an array of the first 10 integers, using the int8 type designation. Use these integers to calculate the first 10 terms in the harmonic series. Explain your results." I don't understand why I get the results I do and was wondering if someone could explain. I know that the int8(x) stores x as an integer as one byte but I still can't seem to explain why I get the results I do. Thanks in advance!

for k=1:10

a(k)=int8(k);

end

b=1./a

b =

1 1 0 0 0 0 0 0 0 0

2. Relevant equations

3. The attempt at a solution

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: MATLAB question int8(x)

**Physics Forums | Science Articles, Homework Help, Discussion**