필터 지우기
필터 지우기

Plot associate two numbers

조회 수: 1 (최근 30일)
Brave A
Brave A 2021년 2월 5일
댓글: KSSV 2021년 2월 5일
Hi there,
I am trying to plot those numbers below but i need to associate them. For example I want the line coming from 0.04 and so on.
But the problem this plot them from 0.
Plot([0.04 70],'-.r*')
hold on
plot( [ 0.06 146 ],'--mo')
hold on
plot([ 0.05 161],':bs')
hold on
plot([ 0.07 193],'-.r*')
hold on
plot([0.08 197],'--mo')
hold off
  댓글 수: 1
Brave A
Brave A 2021년 2월 5일
Any suggestions?

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

채택된 답변

KSSV
KSSV 2021년 2월 5일
P = [0.04 70 ; 0.06 146 ; 0.05 161 ; 0.07 193 ; 0.08 197] ;
plot(P(:,1),P(:,2))
  댓글 수: 6
Brave A
Brave A 2021년 2월 5일
I need like your code but each them in line.
KSSV
KSSV 2021년 2월 5일
P = [0.04 70 ; 0.06 146 ; 0.05 161 ; 0.07 193 ; 0.08 197] ;
[m,n] = size(P) ;
for i = 1:m-1
plot(P(i:i+1,1),P(i:i+1,2))
hold on
end

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by