From: James Ramm on
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?
From: Steven Lord on

"James Ramm" <theres_ambrosia_there(a)hotmail.com> wrote in message
news:hp4lci$soo$1(a)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(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


 | 
Pages: 1
Prev: Java problem
Next: Image Comparison