Info

此问题已关闭。 请重新打开它进行编辑或回答。

how do i print the 10 figures seprately ?

1 次查看(过去 30 天)
STUDENT
STUDENT 2019-10-23
关闭: MATLAB Answer Bot 2021-8-20
clear;clc
M = rand(1000,10);
M = cos(2*pi*M);
for c = 1:size(M,2)
figure(c)
hist(M(:,c))
title(num2str(c))10')
% print images to file e.g. 1.png to 10.png
end
csvwrite('randomData.csv',M)

回答(1 个)

Shubham Gupta
Shubham Gupta 2019-10-24
Try:
clear;clc
M = rand(1000,10);
M = cos(2*pi*M);
for c = 1:size(M,2)
figure(c)
hist(M(:,c))
title(num2str(c))
print(num2str(c),'-dpng')
end
csvwrite('randomData.csv',M)
Hope it helps !

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by