MXarray Problem Found an Mxarray

5 visualizaciones (últimos 30 días)
Joseph
Joseph el 6 de Sept. de 2024
Editada: Walter Roberson el 6 de Sept. de 2024
UpsilonT=zeros(n_u*Np,n_y*Np); Gamma=zeros(n_y*Np,n); H = zeros(6,6); W_inv = zeros(6,6); lSTE = zeros(6,3);
% %%%%%%%%%%%%%%%%%%%%%% System Matrixce%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Yref = [iq_ref; id_ref; wm;0];
%Vo_xy_ref = [real(vref) imag(vref) wm]';
%% System state
x_k = zeros(3);
id = real(is_meas);
iq = imag(is_meas);
x_k = [id; iq; wm ];
uabc_k_1 = [0 0 0]';
% %% Unconstrained solution calculation
F_k=UpsilonT*(Gamma*x_k-Yref)-lSTE*uabc_k_1;
I have already defined my matrices even the x_k just to be safe but
Error:Expected either a logical, char, int, fi, single, or double. Found an mxArray. MxArrays are returned from calls to the MATLAB interpreter and are not supported inside expressions. They may only be used on the right-hand side of assignments and as arguments to extrinsic functions.
Function 'MATLAB Function1' (#522.2057.2066), line 82, column 15:
"Gamma*x_k"
Launch diagnostic report.

Respuestas (1)

Piyush Kumar
Piyush Kumar el 6 de Sept. de 2024
@Joseph, Please check this Answer. It has described the solution to same error.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by