I´m trying to printing comparative columns to compare elements with the same index of two or three differents vector. I will illustrate my question with the next example
>> a = [5.47758 7.46578 3.45323]
a =
5.4776 7.4658 3.4532
>> b = [5.65432 4.45678 2.34789]
b =
5.6543 4.4568 2.3479
Now if I write
>> sprintf('%.2f %.2f\n',a, b)
I get the following response from Matlab
ans =
5.48 7.47
3.45 5.65
4.46 2.35`
But what the way I would like to see this presentation of values is this
ans =
5.48 5.65
7.47 4.46
3.45 2.35
How can I use the function sprintf (or other function or way) to get the above representation? Thank you.