adding a number to an array

2 ビュー (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by