![]() |
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 Daloisio Application Engineer SPDM - Simulation Process and Data Management
LinkedIn: https://www.linkedin.com/in/davidedaloisio/ Office: +39 0461 979338 Mobile: +39 347 8769382 e-mail : [hidden email]
------------------------------------------ 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 |
![]() |
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 |
![]() |
Thanks Christophe for your suggestion. I managed to solve. But later this error message appeared: at line 8 of executed file D:\users\A_DLO_AreaTecnica\A_DLO_R&D\R&D\REM\ROMCRF\to_DLO\Input\first_opt\script_interpolazione.sci inconsistent row/column dimensions Davide Daloisio Application Engineer SPDM - Simulation Process and Data Management
LinkedIn: https://www.linkedin.com/in/davidedaloisio/ Office: +39 0461 979338 Mobile: +39 347 8769382 e-mail : [hidden email]
------------------------------------------ Please, consider your environmental responsibility! Before printing this e-mail ask yourself: "Do I need a hard copy?" Il giorno mar 24 nov 2020 alle ore 09:35 Dang Ngoc Chan, Christophe <[hidden email]> ha scritto: Hello Davide, _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users |
![]() ![]() |
Dang Ngoc Chan, Christophe |
![]() |
Hello,
> De : users <[hidden email]> De la part de Davide > Daloisio Envoyé : mardi 24 novembre 2020 14:51 > > inconsistent row/column dimensions Difficult to say without the code. You usually have this when you multiply matrices (the number of rows of the first one must match the number of columns of the second) or the like. -- 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 |
Free forum by Nabble | Edit this page |