⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imdatsort.m

📁 im2dat.m is used to convert images to data which can be plotted using the standard MATLAB functions.
💻 M
字号:
function [X,Y]=imdatsort(x1,y1)
%This fucntion is used to sort the two output vectors from IM2DAT.M. The output
%can be used to draw a line plot.
%
%Syntax:
%				[X,Y]=imdatsort(x,y)
%
%(Function tested on MATLAB 5.1)
%                                                 Written by: Sumeet Yamdagni
%                                                 Email: syamdagni@hotmail.com
%--------------------------------------------------------------------


Z=[x1; y1];
n=length(Z);

for i=1:(n-1)

for j=1:(n-i)

if Z(1,j)>Z(1,j+1)
	T=Z(:,j+1);
	Z(:,j+1)=Z(:,j);
	Z(:,j)=T;
end

end
end

X=[];
Y=[];
X=Z(1,:);
Y=Z(2,:);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -