how to make animation in matlab? i want to show animation for water flow and led blinking in matlab

 채택된 답변

Grzegorz Knor
Grzegorz Knor 2011년 9월 16일

1 개 추천

There is a lot of options. The main idea is as follows:
  • create an object (for example line)
  • change it propeties in a loop
simple example:
figure('menubar','none','color','k')
h = plot(sin(sqrt(2)*0+sqrt(3)),cos(sqrt(5)*0),'r.','MarkerSize',20);
xlim([-1 1])
ylim([-1 1])
axis off
for t=0.01:.01:100
set(h,'xdata',sin(sqrt(2)*t+sqrt(3)),...
'ydata',cos(sqrt(5)*t))
drawnow
end
See also:

댓글 수: 1

PRIYANK SHAH
PRIYANK SHAH 2011년 9월 17일
thank u very much its working......
can u tell me
: is this possible to measure sound level (db) of generated sound signal using matlab ? sound signal is sent to sound card .. but i dont know how to measure it or how to save that data for ploting nd convert it into dB?
thanks again for ur reply...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Animation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by