Concatenate signals ( sine wave and a line )

1 回表示 (過去 30 日間)
Bianca Ivan
Bianca Ivan 2020 年 12 月 1 日
コメント済み: Bianca Ivan 2020 年 12 月 1 日
How can I concatenate a sine wave and a line? I tried something and the error was : Dimensions of matrices being concatenated are not consistent.
  4 件のコメント
Timo Dietz
Timo Dietz 2020 年 12 月 1 日
Not sure what you want to plot. A sine wave with a line at its end?
Bianca Ivan
Bianca Ivan 2020 年 12 月 1 日
yes

サインインしてコメントする。

回答 (3 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 12 月 1 日
編集済み: KALYAN ACHARJYA 2020 年 12 月 1 日
total=[a X Y];
Here "a" is row data, so you must have row-wise (horizontally) concatenate

Star Strider
Star Strider 2020 年 12 月 1 日
You are attempthing to vertically concatenate them.
Use commas (,) instead fo semicolons(;) and it will work. Commas horizontally concatenate and semicolons vertically concatenate.

Timo Dietz
Timo Dietz 2020 年 12 月 1 日
I guess you want to add a X/Y line after the sine wave, right?
In this case you have to concatenate X + t and Y + a in order to have a new total X and total Y vector.
Looks weird but is this what you wanted to have: plot([t X], [a Y])
  1 件のコメント
Bianca Ivan
Bianca Ivan 2020 年 12 月 1 日
Thank you! I have to change the vectors values

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by