Dataset reshape: Difference between revisions
Jump to navigation
Jump to search
imported>Scott (New page: ===Purpose=== Change size of a DataSet object. ===Synopsis=== :rx = reshape(x,a,b,c,...) :rx = reshape(x,[a b c]) ===Description=== <tt>reshape(x,m,n)</tt> returns the M-by-N matrix w...) |
imported>Scott |
||
Line 12: | Line 12: | ||
<tt>reshape(x,m,n)</tt> returns the M-by-N matrix whose elements are taken | <tt>reshape(x,m,n)</tt> returns the M-by-N matrix whose elements are taken | ||
columnwise from <tt>x</tt>. An error results if <tt>x</tt> does not have M*N elements. | columnwise from <tt>x</tt>. An error results if <tt>x</tt> does not have M*N elements. | ||
<tt> | <tt> | ||
reshape(x,m,n,p,...)</tt> or <tt>reshape(x,[m n p ...])</tt> returns an N-D array with | reshape(x,m,n,p,...)</tt> or <tt>reshape(x,[m n p ...])</tt> returns an N-D array with | ||
the same elements as X but reshaped to have the size M-by-N-by-P-by-... | the same elements as X but reshaped to have the size M-by-N-by-P-by-... | ||
Note that M*N*P*... must be the same as PROD(SIZE(X)). | Note that M*N*P*... must be the same as PROD(SIZE(X)). | ||
This function generally follows the I/O of the standard reshape command | This function generally follows the I/O of the standard reshape command |
Revision as of 19:15, 17 November 2008
Purpose
Change size of a DataSet object.
Synopsis
- rx = reshape(x,a,b,c,...)
- rx = reshape(x,[a b c])
Description
reshape(x,m,n) returns the M-by-N matrix whose elements are taken columnwise from x. An error results if x does not have M*N elements.
reshape(x,m,n,p,...) or reshape(x,[m n p ...]) returns an N-D array with the same elements as X but reshaped to have the size M-by-N-by-P-by-... Note that M*N*P*... must be the same as PROD(SIZE(X)).
This function generally follows the I/O of the standard reshape command
but some options may not be available here.