provide constant in solve function from an array
조회 수: 5 (최근 30일)
이전 댓글 표시
I wanted to provide the constant in the equation written from array swingx but on solving i am not getting numerical values in return.but it returns an error instead
swingx=[2:0.2:3 3:0.1:6 6:-(4/35):2];
swingy=[0:0.6:3 3:-0.1:0 repmat(0,1,36)];
mx=repmat(0,1,73);
my=repmat(0,1,73);
syms x;
syms y;
for i=1:73
[mx(i),my(i)] = solve('(x-5)^2+(y-10)^2=25, (x-swingx(i))^2+(y-swingy(i))^2=25');
end
I got the following error instead
??? The following error occurred converting from sym to double:
Error using ==> mupadmex
Error in MuPAD command: DOUBLE cannot convert the input expression into a
double array.
If the input expression contains a symbolic variable, use the VPA function
instead.
Error in ==> lell at 18
[mx(i) my(i)] = solve('(x-5)^2+(y-10)^2=25,
(x-swingx(i))^2+(y-swingy(i))^2=25');
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!