LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the way to declare a string array?

Doesn't Mathscript  allow curly brackets in its syntax?

What should be the syntax to define a string aaray?

for example

alpha = {'abc', 'def', 'efg', 'hij'};

0 Kudos
Message 1 of 8
(6,473 Views)

Does this link help you?

0 Kudos
Message 2 of 8
(6,453 Views)

Is this a valid link? I'm not able to open this..

0 Kudos
Message 3 of 8
(6,439 Views)

Is this a valid link? I'm not able to open this..

0 Kudos
Message 4 of 8
(6,438 Views)

Have you tried the same syntax as in MATLAB?

0 Kudos
Message 5 of 8
(6,414 Views)

Yes.

0 Kudos
Message 6 of 8
(6,404 Views)

Hi intersteller,

 

The curly bracket syntax is used to define cell arrays which MathScript does not currently support. It is possible to define an array of strings as follows: myarray=['abc';'def';'ghi'; etc...] but each element (string) is required to be the same size in a standard array. I imagine that would be very inconvenient for you. You might consider trying to modify the function that accepts the cell array to operate on a single string and then call the function multiple times.

 

Regards,

 

K Scott 

0 Kudos
Message 7 of 8
(6,397 Views)

Hi Scott,

Wont it work if the element required is of different size?

for example: myarray=['abcde';'fgh';'i'; etc...] 

0 Kudos
Message 8 of 8
(6,385 Views)