Simple question. Using 'solve' with vectors
이전 댓글 표시
Hi, I am a matlab rookie. Since I am doing simulation work recently, I start to learn matlab from A, again.
Here is my question. I want to deliver 'x' from the following equation such as log(x)=2/(A-B)
Here, A and B are [10,1] vectors with numbers.
So, my result x should get some matrix like x[10,1].
For this, I programmed like,
CC=zeros(10,1);
for i=1:10
syms x
solve(log(x(i))-(A(i)-B(i))/0.67)
CC(i)=CC(i)+x
end
but the command window keeps saying "??? 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."
1. What should I change?
2. If I obtain the result, matlab usually shows in expoenetial terms. How can I order matlab to calculate completely?
Thanks.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!