LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why MATLAB® Language Syntax Return Error 1048?

error.png

Why Does My Script Written in The MathWorks, Inc. MATLAB® Language Syntax Return Error 1048?

 

x = (0:0.1:10)';
y = sin(2*x)./exp(x/5);
trnData = [x y];
numMFs = 5;
mfType = 'gbellmf';
epoch_n = 20;
in_fis = genfis1(trnData,numMFs,mfType);
out_fis = anfis(trnData,in_fis,20);
aa = evalfis([x x1],out_fis);

 

http://www.mathworks.com/help/fuzzy/anfis.html

0 Kudos
Message 1 of 4
(2,963 Views)

now, it's fine

 

but i also have  this probleme 

errorss.png

 

 

x1 = (0:0.1:20)';
y = sin(2*x1)./exp(x1/5);
trnData = [x1 y];
numMFs = 5;
mfType = 'gbellmf';
epoch_n = 20;
in_fis = genfis1(trnData,numMFs,mfType);
out_fis = anfis(trnData,in_fis,20);
aa = evalfis(x1 ,out_fis);

0 Kudos
Message 2 of 4
(2,943 Views)

Hi mikhael,

 

why do you mix MATLAB and LabVIEW in this wierd order?

Why not use basic LabVIEW functions instead?

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(2,923 Views)

What do you get if you define the output as a 2D array?

 

(Or transpose the vector. Remember that matlab has a distinction between row and column vectors and LabVIEW does not). If you create a 2D array, it can be 1xN or Nx1 and you get all elements either way.)

0 Kudos
Message 4 of 4
(2,907 Views)