03-08-2012 03:30 PM
Hello,
I am trying to build a tsunami Simulator and I need to create an empty matrix of zeros for the three variables u,v and b. How do I go about doing this?
The code I need to enter is:
% Build empty u, v, b matrices
u=zeros(length(x), length(y), length(t));
v=zeros(length(x), length(y), length(t));
b=zeros(length(x), length(y));
h=zeros(length(x), length(y), length(t));
Thanks
Sam
03-08-2012 03:35 PM
You probably mean array, as matrices are 2D arrays in LV, so that won't apply to your 3D example.
The Initialize Array function in the Array palette will do the job:
In your case, expand it to 3 dimensions:
03-09-2012 03:14 AM
Thank You Very Much
03-09-2012 04:49 AM
Remember to mark a post as a Solution if it solved your problem (and give Kudos where appropriate )