MXarray Problem Found an Mxarray

5 ビュー (過去 30 日間)
Joseph
Joseph 2024 年 9 月 6 日
編集済み: Walter Roberson 2024 年 9 月 6 日
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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by