Azzera filtri
Azzera filtri

how to solve the problem with extrinsic error here?

5 visualizzazioni (ultimi 30 giorni)
Hello,
Get an following error message by using this code.
Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.
Component:MATLAB Function | Category:Coder 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 x= fcn(u, y,A1,L1,b,C)
coder.extrinsic('evalin')
coder.extrinsic('evalin')
coder.extrinsic('sscanf')
coder.extrinsic('fgets')
fileID = fopen("result.txt", "r");
file = fgets(fileID)
value = sscanf(file, '%g', [1,2]) %
x1 = value(1,1)
x2 = value(1,2)
value=double([x1;x2])
if value(1,1) < 1
x3=[10;20];
end
x_predicted=A1*x3+b*u
x_est1=x_predicted+L1*(y-C'*x_predicted)%Filterung
x3 = x_est1
x_est = x_est1;
What is the problem here?

Risposte (0)

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by