12-17-2010 12:42 PM
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'};
12-19-2010
11:21 PM
- last edited on
12-20-2010
10:53 AM
by
Support
Does this link help you?
12-20-2010 09:06 AM
Is this a valid link? I'm not able to open this..
12-20-2010 09:06 AM
Is this a valid link? I'm not able to open this..
12-20-2010 09:43 PM - edited 12-20-2010 09:47 PM
Have you tried the same syntax as in MATLAB?
12-21-2010 04:03 AM
Yes.
12-21-2010 10:15 AM
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
12-22-2010 01:53 AM
Hi Scott,
Wont it work if the element required is of different size?
for example: myarray=['abcde';'fgh';'i'; etc...]