LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using matlab script block

Hello!
 
I'm using a matlab script block and I have a problem that i don't how to solve it,
 
I want to import a column that in matlab is cell array or char array type. When you create an output in matlab script block you have to specify the data type....I choose string, but with this option you can only import one string....and I want to import a whole column.
 
Someone knows how I have to do to import this data type? I have to do some changes to the data from matlab or I have to use some especific block in labview to adapt the data.
 
Please help me!!
 
 Thanks!!!
0 Kudos
Message 1 of 8
(3,485 Views)

Hello,

I suppose that you should do some changes to the data from matlab due to LabVIEW only supports the input and output of certain kinds of data strutures to a MatLAB script node as you can see in the LabVIEW Help. But I don't know which are the datatype conversion functions that Matlab has. Here you have an example using Matlab command:

http://digital.ni.com/public.nsf/websearch/E63CEC23FD02531A86256F410074B6CF?OpenDocument

I hope this helps.

crisR

0 Kudos
Message 2 of 8
(3,476 Views)
Hello chris!!

Can you post the file about matlab script of the Labview help(the page you have said in your reply) in 7.0 labview version. Is in 7.1 Labview version and I can't open it.

Thanks!
0 Kudos
Message 3 of 8
(3,469 Views)

Hello,

try with this VI.

crisR

 

Message 4 of 8
(3,470 Views)
 
0 Kudos
Message 5 of 8
(3,460 Views)
 
0 Kudos
Message 6 of 8
(3,460 Views)
Hello!
 
I'm near to solve my problem......but I have a column of strings like this for example:
 
str=['labview'
        'labview'
      
0 Kudos
Message 7 of 8
(3,461 Views)
Ooooppss!
My computer is crazy....sorry.
 
I'm near to solve my problem...
 
The problem is that I have a column of strings like this
 
str=['labview'
        'labview2'
       'labview3'
        'labview4']
 
I use the double command but the byte array to string block only converts me an element, do you know is exist another block to change all the elements.
 
I've tried to do with a for loop block....using an index array and changing with i the index element, but it doen'st work.
 
You have some idea?
0 Kudos
Message 8 of 8
(3,459 Views)