From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

running matlab mfile in labview 8.2

Solved!
Go to solution

Hi

 

i am working in a project using basically labview 8.2 and i wrote a program in matlab R2008(m file)and i want to run this file in my labview program; i also load this program into mathscript window but it didn't work because the m file contains many functions; i was wondering if you can please help me in this manner.

 

looking forward to recieving from you

0 Kudos
Message 1 of 9
(3,492 Views)

Hi

 

Does your script written in  MATLAB language syntax return any error ?

0 Kudos
Message 2 of 9
(3,486 Views)

what do you mean by "it didn't work because the m file contains many functions"? 

try the matlab script node, this block uses the matlab kernel so basicaly everything you type inside this block, it's executed by matlab.

attacked is a program that ends by calling matlab's siso tool.

and works ok. 

Mensaje editado por Nihil
0 Kudos
Message 3 of 9
(3,480 Views)
Could you post your m-file as an example?
Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 4 of 9
(3,467 Views)

Hello

 

first of all my mfile program works perfectly in matlab; I have attached the m file program.

 

Looking forward to recieving help from You

0 Kudos
Message 5 of 9
(3,452 Views)
Solution
Accepted by topic author Monireh

worked ok, with me... attached image shows your script, copied and pasted into a mathlab formula node, and the program running asking for the xls file.

did you get that far? if you did, send us the xls so we can go on testing more 🙂

 

Do you not have the mathlab script formula node? should be in  Mathematics>>scripts and formula nodes>>mathlab script node.

 

(if you don't have it please tell me) 

0 Kudos
Message 6 of 9
(3,436 Views)
Thanks for your great help.
0 Kudos
Message 7 of 9
(3,419 Views)

Dear Sir, I am facing some same problem here. But when i run my matlab in labview, it shows Error as attach below. I have follow all the instruction but still cannot run properly. Can anyone guide me in this?

 

matlab & labview.jpg

 

0 Kudos
Message 8 of 9
(2,732 Views)

@weihoong wrote:

Dear Sir, I am facing some same problem here. But when i run my matlab in labview, it shows Error as attach below. I have follow all the instruction but still cannot run properly. Can anyone guide me in this?

 


Please do not post your question in more than one place. Thread: http://forums.ni.com/t5/LabVIEW/Error-when-running-matlab-mfile-in-labview-8-2/td-p/1955835

0 Kudos
Message 9 of 9
(2,716 Views)