Hello, I'm having problem when using "solve" function. For example,
clear a k x y;a=[1, 2];for k=1:1:2 y=subs(abs(solve('x^2+a(k)^2-9')))end
Matlab gave me
y = abs(a(2)^2-9)^(1/2) abs(a(2)^2-9)^(1/2)
instead of numerical results. Of course, the real problem I'm trying to solve is much more complicated, and the array "a" is calculated by another code and actually a more complicated matrix, so I cannot manually assign each a(k) for a numerical number. Could anybody help me on this? I tried to search for an answer here but failed. Many thanks for any help.
Best Answer