Switching a row vector to a column vector
Ältere Kommentare anzeigen
I am having trouble switching a row vector to a column vector using fprintf. However, when I enter the variable that has the vector into the command window, it displays a column. But when I try to output that same variable using fprintf, it shows up as a column. I have another vector that I am trying to add it beside, because I am creating a table. I can't seem to do this however, because the vector will not flip. This is my output so far:

The bottom row of numbers is what I am trying to make a column and put it under "F" in the table. (The row goes on longer, I didn't screencap it all because it would have made the numbers too small in the image).
I have tried using the ' to flip the vector, but with no avail.
Thanks!
Antworten (1)
Titus Edelhofer
am 25 Mär. 2014
0 Stimmen
Hi,
output using fprintf needs always to be done row wise, not column wise. So build up your data e.g. into a cell matrix and print it then using fprintf ...
Titus
4 Kommentare
Matthew
am 25 Mär. 2014
Joseph Cheng
am 25 Mär. 2014
can you paste in the section of code?
Matthew
am 25 Mär. 2014
Matthew
am 25 Mär. 2014
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
