gcf:获取当前显示图像的句柄: 默认 plot 的 position 是 [232 246 560 420] 0. save >> A = randn(3, 4); >> B = 'hello world'; >> save 'data.mat' A B % 将多个对象保存进 data.mat 文件中 >> save data A B % 两个保存语句是等价的: 1. imwrite.saveas.print I = imread('./name.bmp'
一.图片读取保存 (1)读取 clear all [filename,pathname]=uigetfile({'*.jpg';'*.bmp';'*.gif'},'选择图片'); if isequal(filename,0) disp('Users Selected Canceled'); else str=[pathname filename]; im = imread(str); imshow(im); end (2)保存 clear all x=0:0.01:2*pi; plot(x,si
Source: Baidu Wenku % Original code has been modified dirMain = 'D:\test\'; fid = fopen([dirMain, 'test.txt'], 'wt'); % Create txt if the txt not exist matrix = round(rand(4, 5) * 100); [m, n] = size(matrix); for i = 1 : m for j = 1 : n if j == n fpr