[Scilab-users] Copying an array

Antoine Monmayrant antoine.monmayrant at laas.fr
Tue Aug 6 15:00:27 CEST 2013


Le 06/08/13 13:18, cactus_jack a écrit :
> Hi Guys,
>
> Thanks for your replies. Sorry if i wasn't clear enough, my professor didn't
> give me a very clear explanation of what he wants me too do. He said I must
> use a for loop to copy the Q array into a new one but start the copying at
> the index that is half the interpx value.
OK, so my proposition should work (provided that you check that your Q 
array fits in the second half of the new one you are copying to).
No need for a 'for' loop here as Scilab (like Matlab and others) is 
vector and matrix oriented.
If you plan on coding in Scilab avoid for loops if you can as it is 
usually less efficient than more vectorial approaches.

Cheers,

Antoine
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Copying-an-array-tp4027149p4027172.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users




More information about the users mailing list