Filter löschen
Filter löschen

how to solve the problem with extrinsic error here?

1 Ansicht (letzte 30 Tage)
tret retret
tret retret am 13 Jan. 2020
Kommentiert: tret retret am 13 Jan. 2020
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?

Antworten (0)

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by