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 view (last 30 days)
My code is : cdb=sym('i',[3,1]); Plan=[1,3,6;4,7,6;7,5,2]; for i=1:3 for j=1:3 if i==1 M(j,Plan(j,i))=1; elseif i==2 M(j,Plan(j,i))=-(1+cdb(j)); elseif i==3 M(j,Plan(j,i))=cdb(j); end end end I had a problem at "M(j,Plan(j,i))=-(1+cdb(j))", and showed that " 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." what should i do for this?

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!