sizeを使ってみてはいかがでしょうか?
syms x
S = vpasolve(2*x^4 + 3*x^3 - 4*x^2 - 3*x + 2 == 0, x)
sz = size(S,1)
if sz == 4
disp("解の数は4")
else
disp("解の数は4ではない")
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!