フィルターのクリア

Animation on Matlab Graph

1 回表示 (過去 30 日間)
Mauro Mijangos
Mauro Mijangos 2021 年 6 月 2 日
コメント済み: Steven Lord 2021 年 6 月 11 日
Hello everyone, I need your help for the following:
Make a program that draws an animation of the silhouette of the Millennium Falcon (star wars) that moves along the x axis.
Attached image of the plane and an example program
I hope some of you can help me.

回答 (1 件)

Chunru
Chunru 2021 年 6 月 2 日
clear
clc
img = imread('halcon milenario.png');
figure;
himg = imagesc([0 1], [0, 1], img);
xlim([0 10]);
ylim([-3 4]);
axis equal
for t=0:0.1:10
y=cos(pi*t);
himg.XData = t + [0 1];
himg.YData = y + [0 1];
xlim([0 10]);
ylim([-3 4]);
pause(0.05)
end
  3 件のコメント
Chunru
Chunru 2021 年 6 月 5 日
Try yourself first.
Steven Lord
Steven Lord 2021 年 6 月 11 日
This doesn't sound like it's at all related to the original question, so you should ask it as a new question. But since this sounds like a homework assignment, you should show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty. If you do we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.

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

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by