MXarray Problem Found an Mxarray

5 次查看(过去 30 天)
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.

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by