Matlab to Scilab Code Conversion

Joined
Mar 16, 2021
Messages
1
Reaction score
0
I am doing a project on the motion of spherical objects through air. It has 3 equations which need to be solved using the ODE solver. The SS of Matlab Code is provided.

upload_2021-3-16_20-36-32.png


As you can see in the Matlab Code equations have variables that are matrices. When i try to replicate that in SCILAB it gives me error. My SCILAB code is provided below:

upload_2021-3-16_20-38-37.png


Please Note that the rest of the code is Fine in SCILAB as it works when i change the matrix to a single variable. However just to be sure i have attached the complete SCILAB and Matlab Code. The 3 equations i am trying to solve are:

upload_2021-3-16_20-42-8.png


Matrix need to be used as equations have the same variable "velocity" with different values in x,y and z directions. All depending on the variable against which we have taken derivative and trying to solve the equation. This is distance the independent variable

Can Anyone Please Help me
 

Attachments

  • Matlab Code 1.PNG
    Matlab Code 1.PNG
    114.7 KB · Views: 78
  • Matlab Code 2.PNG
    Matlab Code 2.PNG
    60.1 KB · Views: 83
  • Scilab code.txt
    Scilab code.txt
    2.6 KB · Views: 63


Write your reply...

Members online

No members online now.

Forum statistics

Threads
2,529
Messages
9,858
Members
696
Latest member
fairdistribution
Back
Top