LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert a matlab file to VI

Solved!
Go to solution

Hi all,

 

I would like to convert a mat file to VI. The matlab file can be download from:

 

http://www.embl.de/ExternalInfo/nedelec/misc/matlab/tiffread27.m.

 

This matlab file can read a TIFF or STK sequence image file.

 

I've tried to do this for a while, by importing the file into a MATLAB node, but I have not succeeded yet. Especially, I couldn't understand the below three points:

 

1) how to input the file name (string? file path?).

 

2) how to use a sub-function.

 

3) how to output the image (matrix? vector? string?).

 

Any feedback/insights would be very welcome

 

Thanks

0 Kudos
Message 1 of 4
(3,516 Views)
Solution
Accepted by ytan

You would need to add a line in the Matlab Script Node to actually call the function. You can pass in values using Input and Output nodes by right-clicking on the script node and selecting "Add Input" or "Add Output". You then need to set the datatype of the input/output. There's two examples that ship with LabVIEW that you can take a look at.

 

Out of curiosity I tried the script in Matlab, and it barfed at all of the sample TIFF files. It kept complaining about not supporting compression formats or PlanarConfiguration.

 

You may want to try this LabVIEW library.

Message 2 of 4
(3,506 Views)

hi

tel me how u do it

iam also trying the same to convert matlab function into labview

but not sucessing it

 

i have used matlab script node

but not working

could u help me

thnaks

0 Kudos
Message 3 of 4
(3,295 Views)

Please stick to your original post, and stop creating multiple messages in multiple threads. This simply annoys people since they don't know which one to answer. This is a forum of volunteers, most of which have full-time jobs. If you need immediate assistance then you should contact NI support directly by phone.

0 Kudos
Message 4 of 4
(3,276 Views)