problem with the symbolic calculation
Show older comments
Hello! i have a problem: I have a peace of code:
Q1=30;
Q1rad=(pi/180)*Q1;
S1= sym('sin(Q1rad)');
double(S1)
and it doesn.t work because I translate variable to the 'sin(...)' how to make it works? what is the way to calculate expressions with "sin(Q1rad)" and in the end substitute the Q1rad, and calculate the final value of the expression?
best regards! Dmytro.
Accepted Answer
More Answers (1)
Andrei Bobrov
on 6 Nov 2013
q = [30;20;10];
S = sind(q);
A = [S(1) S(2) 1;2 3 S(2);3 S(1) S(3)];
B=[S(3) S(1) 1;3 2 S(1); 2 S(3) S(2)];
C = A*B;
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!