csvファイルのデータを用いた計算
Afficher commentaires plus anciens
function xt = Displacementforced(t,x)
m = 1;
k = 1;
c =0.2;
a = 0.005;
omega = 1;
xt = [x(2);-c/m.*(x(2)-a*omega*cos(omega*t))-k/m.*(x(1)-a*sin(omega*t))]
x0 = [0;0];
t = [0:0.1:30];
[T X] = ode45('Displacementforced',t,x0);
plot(T,X);
xlabel('time[s]')
ylabel('displacement[m]/velocity[m/s]')
legend('displacement','velocity')
上記のようなばねマスモデルを作成しました.
a*omega*cos(omega*t),a*sin(omega*t)にあたる部分を実験で測定したデータを使用したプログラムに変更したいです.測定データはcsvファイルとなっています.
データのインポートをしてそのまま式にいれたのですが変数が認識されませんとなってしまいました.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur プログラミング dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!