LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how user define matlab function will work in labview

 

Hi all

 

 

 

iam trying to implenet the matlab function which i have wrote in Matlab 7.9(R2009b)

 

 function [ op ] = myimplement( ip )

 

 the file is attached below

 

i want to use  matlab function in labview ,i have tried Matlab script node but few of function define in matlab function are not working properly

 

so is any alternative way to implement matlab function in labview environment to implement my algorithm & getting same results

 

thnaks

 

waiting for kind reply

 

iam trying from many days but not geting any results

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 8
(4,211 Views)

When LabVIEW launched Matlab, it's simply calling Matlab and sending it the script. It's really dependent on Matlab to find the function, not LabVIEW. Have you configured Matlab's search path so that it can find your function?

0 Kudos
Message 2 of 8
(4,196 Views)

hi

i have used matlab script as well

or math script window

but it is not reading function?

it run the matlab scripts server

a matlab window open when i run script

my problem is that i want to implement the matlab function which is writen in matlab    & iam running it in simulink file

simliar way i want to run it in lab view

if u want i will send u my matlab code

 

iwant to implement it in labview

 thanks for ur replay

0 Kudos
Message 3 of 8
(4,183 Views)

hi

iam geeting problem if u see my attached file

iam using n=ip(1) ..

while running matlab script node

in lab view

is any other way to implement  the user define function in lab view

one way i read is to make dll file then call it from labview

but iam still facing to problem to do

is any one can help me

thanks in advance

 

0 Kudos
Message 4 of 8
(4,175 Views)

You did not attach a file. Did you intend to attach a new file? Was it a VI? What is this "problem"? We are not mind readers. Please explain what the "problem" is. Is it an error? If so, what is the error code?

 

As for user-defined functions, I have already explained to you that this is a Matlab issue, not a LabVIEW one. Instead of using a function you can copy the inside contents of the function and put that into the script node and pass in the variables through the script node.

0 Kudos
Message 5 of 8
(4,146 Views)

Hi smercurio_fc nd sry if u mind my double post actually iamin last month of my post graduate research so i want to complete it urgently

 

iam attaching detail file what iam facing?/

 

same thing iam doing in Matlab & getting result but while doing in Labview by using Matlab script node not getting

error 1048 is occured

iam attaching word file kindly help me out regarding that problem

i will be thankfull for u

tc

Download All
0 Kudos
Message 6 of 8
(4,136 Views)

Why are you feeding yk and zk to the script node? Those variables are not inputs to the function - the function calculates the values. The function has an input called ip, which is a vector.

0 Kudos
Message 7 of 8
(4,112 Views)

i have used ip as input but still not getting result

is u know any other method to do that task

thanks

0 Kudos
Message 8 of 8
(4,087 Views)