Hello, I'm trying to make some calculation with vectors and matrix, with functions as sin, cos and operators, but comparing with excell...it gives me differences of 0,0004...I have tried with vpa, but...anyone can help me please?
Show older comments
teta_transmis(1,1)=teta+beta(1);%calculul primei orientari
if teta_transmis(1,1) > 400
teta_transmis(1,1)=teta_transmis(1,1)-400;
end
n=length(beta);
for i=2:n
teta_transmis(i,1)=vpa(teta_transmis(i-1,1)+200+beta(i),50);
if teta_transmis(i,1)>400
teta_transmis(i,1)=vpa(teta_transmis(i,1)-400,50);
end;
end;
6 Comments
Walter Roberson
on 14 Jun 2015
vpa() only applies to symbolic calculations.
How different are the answers you see?
Loghin Ana-Maria
on 14 Jun 2015
Edited: Loghin Ana-Maria
on 14 Jun 2015
per isakson
on 15 Jun 2015
Edited: per isakson
on 15 Jun 2015
"I have made the differences"   How have you done that?
Loghin Ana-Maria
on 15 Jun 2015
per isakson
on 15 Jun 2015
Could it a result of rounding errors in the presentation?
Loghin Ana-Maria
on 15 Jun 2015
Accepted Answer
More Answers (0)
Categories
Find more on Common Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!