09-12-2014 10:52 AM - edited 09-12-2014 10:53 AM
Hi
I want to declare an empty 1D array in MathScriptRT node.
This code give a 2D array.
a = [];
I know in Matlab the above code will give me an empty 1D array.
Could anyone tell me how to declare it?
I am using LabVIEW 2013sp1.
Thanks
Solved! Go to Solution.
09-12-2014 11:04 AM
I found a solution
a = zeros(1, 0);
But I am not happy with it. I need a simpler way.
09-12-2014 11:07 AM
A simpler way would be not to use mathscript at all and simply use an empty 1D array diagram constant. 😄
09-18-2014 06:55 AM
It does not like what NI advertised that most of basic MATLAB code can run on MathScript.
09-18-2014 09:21 AM - edited 09-18-2014 09:23 AM
@fucai1116 wrote:
It does not like what NI advertised that most of basic MATLAB code can run on MathScript.
What is "it"?
Maybe you are mistaken in your assumption? Looking at the matlab help,
a = [];
will create a 0x0 array, which is by definition 2D, right? A matrix of zero columns and zero rows!
09-24-2014 06:43 PM
HI altenbach
I was mistaken. I did not check carefully. a = [] will create 0x0 matrix.
Thank you