[Scilab-users] submatrix issue

Carrico, Paul paul.carrico at esterline.com
Fri Jun 1 11:07:10 CEST 2018


Dear all
I've a submatrix issue on the following example, and I do not remember (or understand) why : how can I do this ?
(the goal is to extract and to store within a matrix results from an Ascii file)
Thanks for any help
Paul
###############################################################
mode(0)
clear all

StartNodeLine = 1;
NumberOfNodes = 100;
DimCoordinates = 3;
resu = rand(1000,1);

tic();
NodesMatrix2 = zeros(NumberOfNodes,DimCoordinates+1);
i = [1 : NumberOfNodes]'; NodesMatrix2(i,1) = evstr(resu(StartNodeLine + (DimCoordinates+2)*(i-1)+2));
i = [1 : NumberOfNodes]'.*.ones(1,DimCoordinates)';
j = ones(1,NumberOfNodes)'.*.[1 : DimCoordinates]';
k = StartNodeLine + (DimCoordinates+2)*(i-1)+3+j;

a = evstr(resu(k));

NodesMatrix2(i,j+1) = evstr(resu(k)); // does not work
//NodesMatrix2(i,j+1) = 1; // work(basic assignement)
Duration2 = toc()




EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180601/f7a3bf56/attachment.htm>


More information about the users mailing list