フィルターのクリア

how to Create a mat file for images

1 回表示 (過去 30 日間)
Sharen H
Sharen H 2015 年 4 月 10 日
コメント済み: Image Analyst 2015 年 4 月 12 日
i have 15 images say x1=[1 2
3 4 ]
similarly x2 =[5 6
3 4 ] , x3 till x15
first i want these to be converted to x1= [ 1
2
3
4]
similarly other matrixes also.
i want to save a mat file called
dark = [ 1 6
2 7
3 3
4 4]

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 10 日
A mat file called what?
Anyway, to save those variables:
save(matFileName, 'x1', 'x2, 'x3', 'x4', ...
'x5', 'x6', 'x7', 'x8', ...
'x9', 'x10', 'x11', 'x12', ...
'x13', 'x14', 'x15', 'dark');
  4 件のコメント
Sharen H
Sharen H 2015 年 4 月 12 日
my data is i have 15 images of size mxn which has to be converted to 1 x m*n matrix .
then i have to save these in the form of mat file having 15 x m*n matrix. can u
help me to do this in way where i have to call and save using loop because my data
gets increases as it goes on. thanks in advance
Image Analyst
Image Analyst 2015 年 4 月 12 日
Try this:
x1 = x1(:); % Convert to 1-D
x2 = x2(:); % Convert to 1-D
... etc.
x15 = x15(:); % Convert to 1-D
dark = dark(:); % Convert to 1-D
% Now save them all into a single mat file.
save(matFileName, 'x1', 'x2, 'x3', 'x4', ...
'x5', 'x6', 'x7', 'x8', ...
'x9', 'x10', 'x11', 'x12', ...
'x13', 'x14', 'x15', 'dark');

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by