How to ignore domain values to match range values

조회 수: 1 (최근 30일)
jjlivestrong
jjlivestrong 2012년 9월 6일
I have this x/y values that does not have the same length. Since x label is the widest, I want to ignore some y values so that I can use them for later plotting.
I am proceding the following way:
c = [1,2,3];
t = [now :1: now + 6]
x = sin(t)
I am trying to generate a code that reads the first n values of x to match the n values of c.
Can you please help?
  댓글 수: 2
jjlivestrong
jjlivestrong 2012년 9월 6일
I forgot to mention, c = y
Matt Fig
Matt Fig 2012년 9월 6일
What do you mean, "x label is the widest"?
You mention n, but don't show n. Is n the length of c?
x(c) % returns the first 3 values of x.

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

채택된 답변

Walter Roberson
Walter Roberson 2012년 9월 6일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by