11-04.txt
来自「MATLABR2006a基础教程」· 文本 代码 · 共 9 行
TXT
9 行
% the example of functions csvread and csvwrite
I_matlab = imread('D:\matlab.bmp'); % read in the image
I_matlab = rgb2gray(I_matlab); % convert the image to gray image
figure,subplot(1,2,1),imshow(I_matlab); % show the image
csvwrite('D:\matlab.txt',I_matlab); % write the data into a text file
sub_matlab = csvread('D:\matlab.txt',70,70);% read in part of the data
sub_matlab = uint8(sub_matlab); % convert the data to uint8
subplot(1,2,2),imshow(sub_matlab); % show the new image
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?