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!



