# [Scilab-users] CSV Building

4 messages
Open this post in threaded view
|

## [Scilab-users] CSV Building

 Good evening,I'm building a script to be able to create the matrix of two vectors that have different timesteps at the start. So I am writing a new matrix with two vectors that have the same timestep. In this specific case I have a time vector with a timestep (step) of about 2E-4 and then I want to create another vector with a constant speed (vel) equal to 2. To then couple them into a new matrix. When I run the script it gives me an error on line 7. Could someone give me a tip?Davide DaloisioApplication Engineer SPDM - Simulation Process and Data Management Office: +39 0461 979338Mobile: +39 347 8769382e-mail : [hidden email]www.enginsoft.comwww.caeconference.com ------------------------------------------ Please, consider your environmental responsibility! Before printing this e-mail ask yourself: "Do I need a hard copy?" _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: CSV Building

 Hello Davide, > De : users <[hidden email]> De la part de Davide > Daloisio Envoyé : lundi 23 novembre 2020 17:13 > > So I am writing a new matrix with two vectors that have the same timestep. > In this specific case I have a time vector with a timestep (step) of > about 2E- When you're writing: A = B(C) Where B is a matrix, then C must be a matrix of Booleans (the cells you keep or reject) or of integers (the indices). So the code t_vel(1:step:l_vel) is not valid as step is not an integer. I'm not sure what you're trying to do but I guess you should try something like: new_t_vel = t_vel(1) + step*(0:l_vel); Hope this helps -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users