Concatenate signals ( sine wave and a line )
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (3개)
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
댓글 수: 0
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.
댓글 수: 0
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])
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!