필터 지우기
필터 지우기

how can i use one equation output values in another equation input

조회 수: 3 (최근 30일)
Vedang Mhaske
Vedang Mhaske 2021년 5월 25일
댓글: Vedang Mhaske 2021년 5월 26일
pstep = 20;
freq = [2 3 4 5 6 7];
itime = (1./(freq.*pstep));
X = (pi.*freq.*itime);
accl = (1000.*sin(X));
plot
(itime,'-bo')
i need to pass itme values in second equation one by one and plot them itime vs freq

답변 (1개)

darova
darova 2021년 5월 25일
Try meshgrid
[x,y] = meshgrid(freq,itime);
plot(x,y)
  댓글 수: 1
Vedang Mhaske
Vedang Mhaske 2021년 5월 26일
hello darova,
I was not looking for this solution I was looking for a Simple line graph. But thank you for your help I found the solution
pstep = 20;
freq = [2 3 4 5 6 7]; % Array is created and is automatically passes one by one value
itime = (1./(freq.*pstep));
X = (pi.*freq.*itime);
accl = (1000.*sind(X)); % sind = d is for degrees without d in radians
plot(itime,accl,'-bo') % - creates line graph, b for blue color, o is points marked

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

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by