Azzera filtri
Azzera filtri

Concatenate signals ( sine wave and a line )

9 visualizzazioni (ultimi 30 giorni)
Bianca Ivan
Bianca Ivan il 1 Dic 2020
Commentato: Bianca Ivan il 1 Dic 2020
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 Commenti
Timo Dietz
Timo Dietz il 1 Dic 2020
Not sure what you want to plot. A sine wave with a line at its end?

Accedi per commentare.

Risposte (3)

KALYAN ACHARJYA
KALYAN ACHARJYA il 1 Dic 2020
Modificato: KALYAN ACHARJYA il 1 Dic 2020
total=[a X Y];
Here "a" is row data, so you must have row-wise (horizontally) concatenate

Star Strider
Star Strider il 1 Dic 2020
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 il 1 Dic 2020
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])

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by