How can I correct the wrong size of a variable (matrix instead of a vector)?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Loren99
am 12 Okt. 2021
Bearbeitet: Loren99
am 14 Okt. 2021
Hi everyone; I have a problem with this code. My aim is to plot m_app of a cube (6 facets) in function of times, so I would like to have m_app as a vector whose length is the one of the times (41). The problem is that from this code I obtain that m_app is a matrix of dimension 41x41 and I don't know where is the error. Can someone help me? Thanks in advanc
0 Kommentare
Akzeptierte Antwort
Kevin Holly
am 12 Okt. 2021
Bearbeitet: Kevin Holly
am 12 Okt. 2021
This line here creates a matrix. When one numerical value (n) is entered into the zeros function, it creates a n by n matrix.
m_app = zeros(length(times));
could change it to a vector like this:
m_app = zeros(length(times),1);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!