Import data into function

1 回表示 (過去 30 日間)
Yves Block
Yves Block 2017 年 12 月 4 日
コメント済み: Yves Block 2017 年 12 月 5 日
I am working on a project to make a simulation of a submarine. Pretty difficult since I will be working with 6 degrees of freedom, namely Surge, Sway, Heave, Roll, Pitch and Yaw. I am thinking to make this simulation based on the equations of motion: F = m*a and on the other hand the resistance of the submarine.
After a deep look into Matlab I found the ode45 function. I found out how it works but... I have to make a function in where I will have to define my variables. Since I'll have to make at least 6 functions it would me nice if I can import data from 1 file into all of these functions.
Anyone can help me? Do you think this is the right approach of this mathematical problem? Any examples available?
Thanks in advance
  2 件のコメント
ANKUR KUMAR
ANKUR KUMAR 2017 年 12 月 5 日
Are you trying yo import data from the file? Visit: https://in.mathworks.com/help/matlab/ref/importdata.html#inputarg_filename
Yves Block
Yves Block 2017 年 12 月 5 日
I tried this. It works in the command window but not within the function.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by