Extending an array into 3D

  • Follow


Hi, 
I have an array which is 465x323 elements. It is the 'x' co-ordinates for some data I am plotting in 3D, so I need to extend into 465x323x4, i.e just repeat the same array over.
At the moment I do:

X=cat(3,X,X,X,X)

This could get very lengthy if the 3rd dimension was 10 or more long...Is there a better way? 
0
Reply James 4/2/2010 11:45:22 AM

"James Ramm" <theres_ambrosia_there@hotmail.com> wrote in message 
news:hp4lci$soo$1@fred.mathworks.com...
> Hi, I have an array which is 465x323 elements. It is the 'x' co-ordinates 
> for some data I am plotting in 3D, so I need to extend into 465x323x4, i.e 
> just repeat the same array over.
> At the moment I do:
>
> X=cat(3,X,X,X,X)
>
> This could get very lengthy if the 3rd dimension was 10 or more long...Is 
> there a better way?

HELP REPMAT.

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ 


0
Reply Steven 4/2/2010 1:22:52 PM


1 Replies
189 Views

(page loaded in 0.038 seconds)

Similiar Articles:













7/17/2012 10:31:18 PM


Reply: