NI Home > Community > NI Discussion Forums

LabVIEW MathScript RT Module

Reply
Member
sky10
Posts: 7
0 Kudos

imread (fread_image) and .m file in mathsript node

Hello. I got problems.

In Matlab, imread(filename) returns M-by-N-by-3 array if the file contains a truecolor image.

The problem is to give M-by-N array when I used fread_image in labview mathscript.

How can I get M-by-N-by-3 array in labview mathscript?

 

One more problem is about the mathscript node.

Can I call the defined .m file functions in mathscript node?

For example, just image that I've already defined some .m files in LabView data directory.

Then, is it possible to call these functions in mathscript node?

I know that it works in Labview mathscript.

Now I want to run these fuctions with mathscript node in VI.

 

Please help me.

Active Participant
ttrr
Posts: 245
0 Kudos

回复: imread (fread_image) and .m file in mathsript node

Hi,

 

MathScript currently does not support 3D array. Then, fread_image is not able to return M-by-N-by-3 array.

 

Yes, you can call user defined function in MathScript Node. Just make sure that the function is in MathScript Search Path.