LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how matlab function is work in labview

hi all

i have implenet a function say

function [op]=myimplement(ip) in Matlab

& i have used it in simulink as Matlab function

as i have attached the both matlab file name & also Simulink file

 

i want to convert the matlab function int Labview

i have tried by using Matlab script node

but its is not working ??

so where iam doing any mistake??

iam also attaching Labview file as well name funct.vi

waiting for any kind replay

thnaks

 

 

Download All
0 Kudos
Message 1 of 2
(2,440 Views)

As it is the Matlab node can't really do anything with that. It would be no different than if you have a .m file. You need to call the function. The Matlab node does not do that automatically (and neither does the Matlab editor). Of course, it's probably simpler to just remove the "function" line and have the last line changed to say

uk=[x_ukp1;x_ykp1;x_zkp1;thetakp1(:)];

instead of

op=[x_ukp1;x_ykp1;x_zkp1;thetakp1(:)];

 

Note: I believe your input variable should be "ip", not "n", since you calculate "n" in the script.

0 Kudos
Message 2 of 2
(2,429 Views)