Error in dividing the data
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Walter Roberson
le 23 Nov 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Whos dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!