why is my plot not showing anything
古いコメントを表示
function BTLnhom11
clear;
close;
syms t v;
disp('Chon chieu duong huong len')
disp('Chon goc toa do tai mat dat');
disp('Phuong trinh dinh luat II Newton cho ten lua');
fprintf('\t\tm*dv/dt = -v0*dm/dt - mg\n');
k=input('Nhap toc do dot nhien lieu dm/dt = ');
m0=input('Nhap khoi luong ban dau cua ten lua m0 = ');
y0=input('Nhap vi tri ban dau cua ten lua y0 = ');
v0=input('Nhap van toc day khi cua ten lua v0 = ');
g=9.81;
v=v0*log(m0/(m0-k*t))-g*t;
t1=m0/k;
disp('Gia toc cua ten lua a=');
a=diff(v,1);
disp(a);
disp('Phuong trinh chuyen dong ten lua y = ');
y= y0+int(v,t);
disp(y);
fprintf('Ten lua het nhien lieu tai thoi diem t= %0.2f s\n',t1);
fprintf('Tai t= %0.2f s ten lua khong con chuyen dong\n',t1);
fplot(y,[0 t1],'r');
title('Do thi bieu dien phuong trinh chuyen dong cua ten lua');
xlabel('Thoi gian t');
ylabel('Do cao(h)');
grid on;
I want to plot y, but it not working.
2 件のコメント
Walter Roberson
2021 年 12 月 3 日
We would need to know the input values in order to test this.
Quang Nguyen
2021 年 12 月 3 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



