adding a number to an array

조회 수: 3 (최근 30일)
Emma
Emma 2019년 9월 12일
댓글: Emma 2019년 9월 12일
I am trying to create two arrays - one for time, which represents all of the x values for the graph, and one for y, which represents the corresponding y values for each time. The arrays need to be the same length. One section of the graph is a constant, and I am unable to get the y array to be the same length as x. For example, if x is [1 2 3 4 5], the problem I'm running into is that I need y to be [1 1 1 1 1] but can only set the code to be [1, 1].
  댓글 수: 4
Walter Roberson
Walter Roberson 2019년 9월 12일
e = [e, repmat(s, 1, length(tsustain))]
Emma
Emma 2019년 9월 12일
Thank you!

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

답변 (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