[Scilab-users] Hypermatrix manipulation
Samuel Gougeon
sgougeon at free.fr
Wed Nov 18 00:39:34 CET 2015
Le 17/11/2015 21:25, petarf a écrit :
> Thank you for your replay.
>
> So basically I need to store data from hypermatrix to another matrix and
> then I can write it to a file?
Yes, together with its sizes. If the numbers are all reals, you may use
something like this:
H = rand(50,3,3,3);
filename = TMPDIR+"\record_hypermat_as_text.txt";
fprintfMat(filename, matrix(H,50,-1), "%lg", "size: "+strcat(string(size(H)),","));
[M, header] = fscanfMat(filename);
s = evstr(tokens(part(header,6:$),",")');
rH = matrix(M,s); // recovered hypermat The output format may be tuned
("%lg"). Samuel Gougeon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20151118/e2e5b759/attachment.htm>
More information about the users
mailing list