Simple question. Using 'solve' with vectors
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!