Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to fix Error in MuPAD command error in Matlab?
I use a function with input parameters, then find the minimum of the function using fminsearch:
syms x1 x2 x3 h
x = [0, 0, 0];
p = [ -4, 0, 1];
A =
[[22; 28; 12];
[28; 39; 15];
[12; 15; 7]];
b = [4; 0; -1]
L = x - h * p;
L = L';
fNew = @(h)(1/2 * dot(A * L, L') - dot(b, L'))
h0 = 0;
L = fminsearch(fNew,h0)
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.
Error in fminsearch (line 191)
fv(:,1) = funfcn(x,varargin{:});
Error in Projection2 (line 60)
L = fminsearch(fNew,h0)
fNew = @(h)((263*h^2)/2 - 17*h)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question