Skip to content

Commit

Permalink
一波大更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Tridu33 committed Sep 21, 2018
1 parent 7b287b7 commit 5af2459
Show file tree
Hide file tree
Showing 663 changed files with 47,722 additions and 6 deletions.
1 change: 1 addition & 0 deletions ACLL_iwantagirlfriend.m
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
char([73 32 119 97 110 116 32 97 32 103 105 114 108 32 102 114 105 101 110 100 46 46 46])
58 changes: 58 additions & 0 deletions CalendarTable.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
%非常漂亮的日历,网上下载的,忘了出处了一个不错的Matlab的gui界面设计实例[转]

function CalendarTable;
% calendar 日历
% Example:
% CalendarTable;

S=datestr(now);
[y,m,d]=datevec(S);
% d is day
% m is month
% y is year
DD={'Sun','Mon','Tue','Wed','Thu','Fri','Sat'};
close all
figure;
for k=1:7;
uicontrol(gcf,'style','text',...
'unit','normalized','position',[0.02+k*0.1,0.55,0.08,0.06],...
'BackgroundColor',0.6*[1,1,1],'ForegroundColor','b',...
'String',DD(k),'fontsize',16,'fontname','times new roman');
end
h=1;
ss='b';
qq=eomday(y,m);
for k=1:qq;
n=datenum(y,m,k);
[da,w] = weekday(n);
if k==d;
ss='r';
end
uicontrol(gcf,'style','push',...
'unit','normalized','position',[0.02+da*0.1,0.55-h*0.08,0.08,0.06],...
'BackgroundColor',0.6*[1,1,1],'ForegroundColor',ss,...
'String',num2str(k));
ss='b';
if da==7;
h=h+1;
end
end
uicontrol(gcf,'style','push',...
'unit','normalized','position',[0.6,0.66,0.12,0.08],...
'BackgroundColor',0.6*[1,1,1],'ForegroundColor',ss,...
'String','clock','fontsize',18,'fontname','times new roman');
Tq=uicontrol(gcf,'style','push',...
'unit','normalized','position',[0.74,0.66,0.17,0.08],...
'BackgroundColor',0.6*[1,1,1],'ForegroundColor',[0.1,0.9,0.9],...
'fontsize',18,'fontname','times new roman');
sq='The calendar';
uicontrol(gcf,'style','push',...
'unit','normalized','position',[0.14,0.86,0.37,0.08],...
'BackgroundColor',0.6*[1,1,1],'ForegroundColor',[0.1,0.9,0.9],...
'fontsize',18,'fontname','times new roman','string',sq);
try
while 1
set(Tq,'String',datestr(now,13));
pause(1);
end
end
Binary file added M-book编写-数理统计基本知识.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
80 changes: 80 additions & 0 deletions MATLAB 必须知道的基本操作.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
clc;
clear;
%https://blog.csdn.net/sinat_34820292/article/details/77624198
%MATLAB必须知道的知识

A = [1 2 3 4;5 6 7 8;9 10 11 12];
A(:,2:3)
A(2:end,:)
A([1 3 5; 7 9 10])
A(A>4)
A(find(mod(A,2)==0))
A(:)
reshape(A,4,3)%reshape是按列读取,然后按列摆放
B=[A A];
% A 所有的脚本文件(不带function关键字的m文件)和控制台共有一个作用域,这个变量域一般称之为workspace工作区。
% B 每个函数具有单独的作用域,(有时看到网上的函数文件开头用clear清除数据觉得很外行)
% 注意:不是B是局部变量,A是全局变量的关系,因为函数并没办法直接使用工作区的变量
%
% rand,mod,round,floor,ceil,mode,plot,solve,dsolve,eval,subs,disp,fprintf,zeros,ones,magic,sort,sortrows,max,min,isempty等
%
% clear,save,load,clc,tic,toc,close等

%{
对象(结构体),元胞数组等数据类型
A.title=’标题’
A.xlabel=’时间’
A.ylabel=’天气’
A.A = A
c{1} = 1
c{2} = [1 2]
c{3} = 1==1
c{4} = ‘aaa’
%}
%
% plot,ezplot,title, xlabel, ylabel, axis, hold, grid, subplot, 还可以系统学一下matlab gui, 可以做很多有意思的东西,建模不实用,matlab的gui还支持latex公式语法
%{
数据导入
xlsread
importdata
fopen
ls
xlswrite
load
save
char
%}


% 常用工具箱
%
% cftool
% wavemenu
% plottools
% guide


网上搜索想要的函数

% 百度搜索你想用matlab实现的功能如:matlab 怎么处理时间
% doc
% help
%{
我的任务总结成五字“需算CDJ”,称为五行,
需:需求分析,财务软件也,属火
算:算法也,数学建模也,属土
C:C#,属木
D:DELPHI,属水
J:JAVA,属金
其中我最少思考的是“算”,又分出五行
金:《数据结构》PDF还要不要复习记忆,是否无用
木:《遗传算法》和《算法艺术》PDF要不要深入研究
水:数学建模的论坛太少了解
火:切割原料问题和背包问题等几个应用数学实例值得研究下
土:MATLAB和不少经济统计软件未会用,甚至包括EXCEL的单变量求解等功能
%}



Binary file added MATLAB1中英文对照.pdf
Binary file not shown.
Binary file added MATLAB中有趣的演示实例.doc
Binary file not shown.
Binary file added MATLAB函数速查手册.pdf
Binary file not shown.
Binary file added MATLAB实现的.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MATLAB小技巧.doc
Binary file not shown.
Binary file added MATLAB工具箱.pdf
Binary file not shown.
139 changes: 139 additions & 0 deletions MATLAB汉诺塔游戏.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
function XhanX(n,a,c,t)
%���ø�ʽXhanX(n,a,c,t)
%nΪ�����������ʼ������a�Ÿ��ϣ�
%Ҫ�������Ƶ�c�Ÿ���ȥ��a��c=1,2,3��
%tΪʱ��(֡��)����0������С��30�����n����5��tС��15��n����8��tС��3
%���tȡ0��Ϊ��Ϸģʽ����Ϸģʽ����Ϸģʽ��
%by ���� 2013.7
global var A cd N h h1 v T X
%A��ÿ������Ľṹ����ɵ�����
%cd��i,:����i�������ϵ�������ŵ�����
%var��i����i�������ϵ�������
%hΪ������ܸ�
%h1ÿ��ĸ�
%v��i����i�����ӵ�����λ��
%N=n��
%TΪʱ��,֡�������Tȡ0����Ϊ��Ϸģʽ
%XΪ�ַ���
try
var(a)=n;var(c)=0;var(6-a-c)=0;
h=100;h1=100/n;d=1;v(1)=2+n;v(2)=(2+n)*2;v(3)=(2+n)*3;cd(a,:)=1:n;N=n;T=t;
for i=1:n
A(i).xingzhuang1=[v(a)-(n+2-i)/2,v(a)+(n+2-i)/2,v(a)+(n+2-i)/2,v(a)-(n+2-i)/2];
A(i).xingzhuang2=[0,0,h1,h1];
A(i).gaodu=i;
end
figure;
if T==0
X=['�뽫',num2str(a),'�ϵ����������Ƶ�',num2str(c),'������ȥ��'];T=6;g();Xhanc(c);
else
X=['�Զ�ģʽ'];g();pause(1);Xhan(n,a,c);
end
clear global
catch
clear global
end




function Xhanc(c)
%��Ϸģʽ
try
global N var cd A
while 1
while 1
k=waitforbuttonpress;
p1=get(gca, 'currentpoint');
q1=ceil((p1(1,1)-N/2-1)/(N+2));
if q1<=3&q1>=1&var(q1)~=0
A(cd(q1,var(q1))).gaodu=var(q1)+1;
g();
break;
end
end
while 1
k=waitforbuttonpress;
p2=get(gca, 'currentpoint');
q2=ceil((p2(1,1)-N/2-1)/(N+2));
if q2<=3 & q2>=1
break;
end
end
if q1==q2
A(cd(q1,var(q1))).gaodu=var(q1);
g();
continue;
end
if var(q2)>0 & cd(q1,var(q1))<cd(q2,var(q2))
A(cd(q1,var(q1))).gaodu=var(q1);
g();
continue;
end
f(q1,q2);
if var(c)==N
xlabel('�ɹ�ͨ�أ�����','fontsize',18,'color','r');
return;
end
end
catch
clear global
end



function Xhan(n,a,c)
%�����㷨����n����a�Ƶ�c��ȥ
if n==1
f(a,c);
else b=6-a-c;
Xhan(n-1,a,b)
f(a,c);
Xhan(n-1,b,c)
end

function f(a,c)
%��a�������Ϸ��������Ƶ�c�����Ϸ�
try
global var cd A v N T
high=ceil(1.5*N)+1;p=ceil(T/2);q=ceil(T);
m=(high-A(cd(a,var(a))).gaodu)/q;
xx=(v(c)-v(a))/p;
var(c)=var(c)+1;n=(high-var(c))/q;
cd(c,var(c))=cd(a,var(a));
for i=1:q
A(cd(a,var(a))).gaodu=A(cd(a,var(a))).gaodu+m;
g();
end
for i=1:p
A(cd(a,var(a))).xingzhuang1=A(cd(a,var(a))).xingzhuang1+xx;
g();
end
for i=1:q;
A(cd(a,var(a))).gaodu=A(cd(a,var(a))).gaodu-n;
g()
end
cd(a,var(a))=0;
var(a)=var(a)-1;
catch
clear global;
end
function g()
%����Ŀǰ��ͼ��
global T v h h1 N A X
clf
axis([-0.1,4*(N+2),0,2*h])
set(gca,'YColor',[1 1 1],'YTick',[],'XColor',[1 1 1],'XTick',[]);
title('��ŵ��','fontsize',20);
xlabel(X,'fontsize',18,'color','r');
hold on;
plot([0,4*(N+2)],[0,0],'-y','linewidth',10)
for i=1:3
fill([v(i)-0.5,v(i)+0.5,v(i)+0.5,v(i)-0.5],[0,0,1.5*h,1.5*h],'m');
end
for i=1:N
fill(A(i).xingzhuang1,A(i).xingzhuang2+(A(i).gaodu-1)*h1,'c');
end
plot([0,4*(N+2)],[0,0],'-y','linewidth',5)
pause(0.001);

Binary file added MATLAB绘图实例,学习的好程序.pdf
Binary file not shown.
Binary file added P图区/Du.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions P图区/Duhuangxiang.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
clear all;clc;close all;
img = imread('Ö¤¼þpicture.jpg');
% my picture is named lenna.bmp while yours may be not
I = rgb2gray(img);
% Attention: we use the axis off to get rid of the axis.
figure(1),image(I); %equals to imagesc(I,[1 64]);you can try it.
colorbar,title('show by image in figure1');axis off;
figure(2),imagesc(I);
%equals to imagesc(I,[min(I(:)) max(I(:))]);you can try it.
colorbar,title('show by imagesc in figure2');axis off;
%colormap(gray) %use this statement you can get a gray image.
figure(3),imshow(I),colorbar,title('show by imshow in figure3');
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%MATLAB实现五种边缘检测https://blog.csdn.net/weixin_40202230/article/details/78323404
%常用的边缘检测算法有拉普拉斯边缘检测算法、Robert边缘检测算子、Sobel边缘检测算子、Prewitt边缘检测算子、Canny边缘检测算子。

[filename,pathname]=uigetfile({'*.jpg';'*bmp';'*gif'},'选择原图片');%神操作!!!!
I = imread([pathname,filename]);
I=rgb2gray(I);

%五种边缘检测
figure('Name','进行五种边缘检测');
subplot(2,3,1);
imshow(I);
title('原图');

BW1=edge(I,'Roberts',0.16);
subplot(2,3,2);
imshow(BW1);
title('Robert算子边缘检测')

BW2=edge(I,'Sobel',0.16);
subplot(2,3,3);
imshow(BW2);
title('Sobel算子边缘检测')

BW3=edge(I,'Prewitt',0.06);
subplot(2,3,4);
imshow(BW3);
title('Prewitt算子边缘检测');

BW4=edge(I,'LOG',0.012);
subplot(2,3,5);
imshow(BW4);
title('LOG算子边缘检测')

BW5=edge(I,'Canny',0.35);
subplot(2,3,6);
imshow(BW5);

title('Canny算子边缘检测')







Binary file added P图区/热能.fig
Binary file not shown.
Binary file added P图区/证件picture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added P图区/辣眼睛.fig
Binary file not shown.
Binary file added P图区/黑白du.fig
Binary file not shown.
2 changes: 2 additions & 0 deletions R一样的画图包/PlotPub-master/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
*.m~
Loading

0 comments on commit 5af2459

Please sign in to comment.