LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import a function generated by classification Learner app in Matlab to Labview

Hi,

I am trying to use the function code generated by the  classification Learner app in Matlab into Labview. I tried to use the MathScript window but always it gives me errors.

Please find attached the m file of this function, the training and testing sets.

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

Hi nessrine92,

 

What kind of errors are you getting? Is there an error code or a screenshot you can share?

 

You might find the below links helpful:

How Can I Call a .m Script in LabVIEW?: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAnsSAG&l=en-VI

Working Between the MathWorks, Inc. MATLAB® Software Development Environment and LabVIEW:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LbjSAE&l=en-VI

 

 

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

Hi  RebekahC

Thank you for your help, as you can see in the screenshots, when using the Labview mathscript i can't read the excel file (it gives me 'NaN') and it gives error in the matlab code, and when using the matlabt script in the command window it couldn't define the function 'trainClassifier'

Download All
0 Kudos
Message 3 of 4
(2,304 Views)

Hi  RebekahC

Thank you for your help, as you can see in the screenshots, when using the Labview mathscript i can't read the excel file (it gives me 'NaN') and it gives error in the matlab code, and when using the matlabt script in the command window it couldn't define the function 'trainClassifier'

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