for loop with syms variable
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tony Yu
el 29 de Jun. de 2020
Comentada: madhan ravi
el 29 de Jun. de 2020
I am trying to make a loop such that will generate c1=cos(th1) c2=cos(th2).....etc, how can I fix this?
syms th th1 th2 th3 th4 th5 th6
for N=1:6
c(N)=cos(th(N));
end
0 comentarios
Respuesta aceptada
madhan ravi
el 29 de Jun. de 2020
Editada: madhan ravi
el 29 de Jun. de 2020
% Newer versions
syms th [1, 6]
c = cos(th)
%Older versions
th = sym('th', [1, 6]);
syms(th)
c = cos(th)
Más respuestas (0)
Ver también
Categorías
Más información sobre Assumptions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!