Clear Filters
Clear Filters

MXarray Problem Found an Mxarray

30 views (last 30 days)
Joseph
Joseph on 6 Sep 2024 at 16:04
Edited: Walter Roberson on 6 Sep 2024 at 22:38
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.

Answers (1)

Piyush Kumar
Piyush Kumar on 6 Sep 2024 at 17:06
@Joseph, Please check this Answer. It has described the solution to same error.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!