how to save array values in .mat file in 1 column and multiple rows instead of multiple columns in 1 row.

조회 수: 2 (최근 30일)
for i=1:10
j(i)=i*5:
end
j = sort( j );
save('j.mat', 'j');
values are storing in .mat file
5 | 10 | 15 | 20 | ...... | 45 | 50 |
how can i store these values like this
5 |
10|
15|
.
.
. |
50|

채택된 답변

James Tursa
James Tursa 2015년 9월 22일
Transpose j before saving it. E.g.,
j = j.'; % <-- transpose j
save('j.mat', 'j');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by