[scilab-Users] Function resize_matrix with hypermatrix
Mike Page
Mike at Page-One.Waitrose.com
Thu Jun 9 11:07:29 CEST 2011
Hi,
The hypermatrix is stored as a linear array of data and a vector of
dimensions. You may be able to do what you want by altering the dimensions.
For example:
-->a=hypermat([2,3,4],[1:24])
a =
(:,:,1)
1. 3. 5.
2. 4. 6.
(:,:,2)
7. 9. 11.
8. 10. 12.
(:,:,3)
13. 15. 17.
14. 16. 18.
(:,:,4)
19. 21. 23.
20. 22. 24.
-->a.dims=[2 4 2]
a =
(:,:,1)
1. 3. 5. 7.
2. 4. 6. 8.
(:,:,2)
9. 11. 13. 15.
10. 12. 14. 16.
As you see, this just changes the dimensions, but leaves the data the same.
This method cannot be used to extend the size of the data though.
Hope that's helpful,
Mike.
-----Original Message-----
From: Orbeman [mailto:ludo.wag at laposte.net]
Sent: 09 June 2011 08:42
To: users at lists.scilab.org
Subject: [scilab-Users] Function resize_matrix with hypermatrix
Hello,
Does the function resize_matrix with hypermatrix ? It si a similar function
for hypermatrix ?
I envisage to resize my hypermatrix with this function with redefined 2D sub
matrix and concatenated this 2D matrix to create the new hypermatrix.
Thank you.
--
View this message in context:
http://mailinglists.scilab.org/Function-resize-matrix-with-hypermatrix-tp304
2842p3042842.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at
Nabble.com.
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.901 / Virus Database: 271.1.1/3688 - Release Date: 06/08/11
07:34:00
More information about the users
mailing list