Error in dividing the data
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have two values from workspace
Cww=0
0
0
32
0
0
0
0
0
0
Eww=0
0
31
250
345
376
188
63
0
0
my code
for i=1:length(Cww)
S11(i)=100*Eww(i);
Fw(i)=Cww(i)/S11(i);
end
after this i get ans as
Fw=0 0 0 0 0 0 0 0 0 0
i get answer in row wise ,and result is wrong getting all zeros
I tried to do separately in command window
i get answer as
0
0
32767
8
32767
32767
32767
32767
0
0
why i get different answers,why i get 32767value plz provide assistance
0 comentarios
Respuesta aceptada
Walter Roberson
el 23 de Nov. de 2012
Check the class() of your data. You are probably going to find that Eww (and possibly others) is int16 data class. Use double() to convert values from int16 to double precision.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Whos en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!