高手帮忙一下,画下面matlab程序的流程图: 高手帮忙修改一下这个Matlab程序

\u6c42\u9ad8\u624b\u5e2e\u5fd9\u7528,\u7ed9\u4e00\u4e2amatlab\u753b\u56fe\u7684\u7a0b\u5e8f,\u5df2\u77e5\u6570\u636e,\u6309\u5bf9\u5e94\u5173\u7cfb\u753b\u56fe

\u5f88\u7b80\u5355
\u4f8b\u5982

x=[1,2,3,4,5,6]; %\u8fd9\u91cc\u53ef\u4ee5\u6539\u6210\u4f60\u7684\u6570\u636e\uff0c\u6a2a\u8f74
y=[2,3,4,8,9,10]; %\u8fd9\u91cc\u662f\u4f60\u7684\u6570\u636e\uff0c\u7ad6\u8f74 \u6ce8\u610f\u548cx\u7684\u6570\u636e\u4e2a\u6570\u8981\u4e00\u6837
plot(x,y)

\u6709\u51e0\u4e2a\u95ee\u9898\uff1a
(1)\u7ed9y\u8d4b\u6570\u7ec4\u5e94\u7528\u65b9\u62ec\u53f7\u3002
(2)\u56e0R\u4e2d\u6709\u4e24\u4e2a\u6700\u5c0f\u503c\uff0c\u56e0\u800ct=find(R==min(R))\u5f97\u51fa\u7684\u662f\u4e00\u4e2a\u6570\u7ec4\u800c\u4e0d\u662f\u4e00\u4e2a\u6570\u503c\u3002
(3)jujian(k)=A(T(k-1)+1:n)\u4e2d\u5de6\u8fb9\u662f\u4e00\u4e2a\u5143\u7d20\uff0c\u800c\u53f3\u8fb9\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u4e0d\u5339\u914d\u3002
(4)jujian(1)=A(1:T(1))\u4e2dT(1)=0\uff0c\u56e0\u6b64A(1\uff1a0)\u8bed\u6cd5\u4e0a\u9519\u8bef\u3002\u53ef\u80fd\u5176\u4e2dT\u7684\u7b97\u6cd5\u6709\u8bef
y=[207.1
289.9
303.15
305.3
350
351
375.3
386.6
387
402.5
405.5
408
410.6
426.5
446.3
448.8
449.4
453.25
456.82
458
465.78
469
471.6
473.56
486.4
488.2
490
490
491.6
494
494.4
498.6
499
499.5
506.1
506.8
511.3
526
527
531.6
532.6
551
558.4
579
581
582
592.5
596
654.6
668
669
685
739.3
764
800
807.8];
;%\u7ed9\u5b9a\u5df2\u77e5\u7684\u5e8f\u5217

A=sort(y);
n=length(A);
%\u6c42\u53d8\u5dee
D=zeros(n);
for i=1:n
for j=i:n
x(i,j)=sum(A(i:j))/(j-i+1);
D(i,j)= sum((A(i:j)-x(i,j)).^2);
end
end
H=zeros(n);
M=zeros(n);
H(1,:)=D(1,:);
%\u8ba1\u4e00\u7b97\u6240\u6709\u7684\u635f\u5931\u51fd\u6570
for k=2:n
for m=k:n
R=zeros(1,m-k+1);
for i=k-1:m-1
R(i-k+2)=H(k-1,i)+D(i+1,m);
end
t=find(R==min(R));
H(k,m)=min(R);
M(k,m)=t(1)+k-2;
end
end
%\u6839\u636e\u56fe\u8c61\u786e\u5b9a\u5206\u7c7b\u6570k
x=1:54;
y=H(2:55,n)';
plot(x,y,'r.-')
xlabel('\u5206\u7c7b\u6570')
ylabel('L[p(n,k)]')
%\u627e\u51fa\u5206\u7c7b\u533a\u95f4
T(k)=n;
jujian(:,k)=A(T(k-1)+1:n);
for t=k-1:1
T(t)=M(k,T(t+1));
jujian(:,t+1)=A(T(t)+1:T(t));
Point(t)=A(T(t));
end
jujian(:,1)=A(1:T(1));

% 杨氏干涉的模拟
close all
figure('position',[217 266 694 244]);
% Author's email:[email protected]
set(gcf,'DoubleBuffer','on');
axes('position',[0.12,0.08,0.6,0.8]);hold on;
rectangle('position',[-1,1.1,0.1,3],'FaceColor',[0.1,0.3,0.4]);
rectangle('position',[-1,-4,0.1,3],'FaceColor',[0.1,0.3,0.4]);
rectangle('position',[-1,-0.8,0.1,1.6],'FaceColor',[0.1,0.3,0.4]);
axis([-4,12,-5,5]);
ha=plot([-3.8,-3.8],[0.9,0.9],'r','linewidth',3);
hb=plot([-3.8,-3.8],[-0.9,-0.9],'r','linewidth',3);
title('Double slit interference \copyright zjliu')
L=-3.8;
rectangle('position',[11,-4,0.1,8],'FaceColor',[0,0,0]);
plot([-1,4.1],[-3.5,-3.5],'k');
plot([5.9,11],[-3.5,-3.5],'k');
plot([-0.7,-1,-0.7],[-3.3,-3.5,-3.7],'k');
plot([10.7,11,10.7],[-3.3,-3.5,-3.7],'k');
text(4.8,-3.5,'3m');
plot([-1.5,-1.5],[0.9,0.35],'k');
plot([-1.5,-1.5],[-0.9,-0.35],'k');
plot([-1.65,-1.5,-1.3],[0.6,0.9,0.6],'k');
plot([-1.6,-1.5,-1.3],-[0.6,0.9,0.6],'k');
text(-2.1,0,'2mm');
while L<=-0.95;
L=L+0.05;
set(ha,'xdata',[-3.8,L]);
set(hb,'xdata',[-3.8,L]);
pause(0.05);
end
xas=-0.95;yas=0.9;
xbs=-0.95;ybs=-0.9;
po=[-3.5:3.5];
ka=(po-yas)*i+(11+0.95);ka=ka./abs(ka);
kb=(po-ybs)*i+(11+0.95);kb=kb./abs(kb);
for n=1:8;
ah(n)=plot(xas,yas,'r');
bh(n)=plot(xbs,ybs,'r');
end
r=0;
za=xas+yas*i;zb=xbs+ybs*i;
Le=sqrt(11.95^2+3.5^2);
while r<=Le;
for n=1:8;
Ta=za+r*ka(n);
Ya=imag(Ta);
if abs(imag(Ta))>=abs(po(n));
Ya=po(n);
end
set(ah(n),'xdata',[xas,min(11,real(Ta))],'ydata',[yas,Ya]);
Tb=zb+r*kb(n);
Yb=imag(Tb);
if abs(imag(Tb))>=abs(po(n));
Yb=po(n);
end
set(bh(n),'xdata',[xbs,min(11,real(Tb))],'ydata',[ybs,Yb]);
end
r=r+0.05;
pause(0.05);
end
s=meshgrid(linspace(4,-4,300))';
De=abs((s-1)*i+3000)-abs((s+1)*i+3000);
lambda=0.6328e-3;
de_A=De/lambda*pi*2;
It=1-cos(de_A);
axes('position',[0.72,0.16,0.26,0.64]);
cc=cat(3,It/2,zeros(size(It)),zeros(size(It)));
imshow(cc,[]);
xlabel('\copyright zjliu')

  • 楂樻墜甯繖涓涓,鐢讳笅闈atlab绋嬪簭鐨勬祦绋嬪浘:
    绛旓細close all figure('position',[217 266 694 244]);Author's email:[email protected] set(gcf,'DoubleBuffer','on');axes('position',[0.12,0.08,0.6,0.8]);hold on;rectangle('position',[-1,1.1,0.1,3],'FaceColor',[0.1,0.3,0.4]);rectangle('position',[-1,-4,0....
  • 璇锋暀matlab楂樻墜,鎴戞兂鐢matlab鐢浠ヤ笅鍑犱釜鍏紡鐨勫浘,璇烽棶绋嬪簭鏄庝箞鏍风殑...
    绛旓細绋嬪簭濡備笅锛歝lear clc alpha = 0:90;yw1 = 1.05*10^-7.*cos(alpha)+5.72*10^-14*sin(alpha).*tan(alpha);figure(1)plot(alpha,yw1)myl = 0:1000:10^5;n=[0:10];myl=10.^n;鏃犳硶鍒版棤绌峰ぇ锛屽氨鍒10^10 yw2 = 3.03*10^-6.*myl + 1.41*10^-9./myl;figure(2)plot(myl...
  • 姹MATLAB楂樻墜甯鎴戠紪鍐欎笅鎺ヤ笅鏉ョ殑鐢诲浘绋嬪簭
    绛旓細subplot(3,1,1);plot(n,hn1);title('hn1'); % 鐢籬n1鍥 subplot(3,1,2);plot(n,xn);title('xn'); % 鐢粁n鍥 subplot(3,1,3);plot(n,yn);title('yn'); % 鐢粂n鍥
  • 鎯虫眰MATLAB楂樻墜甯鎴戠敾鍥
    绛旓細鎶婃暟鎹创鍑烘潵
  • 姹傞棶matlab楂樻墜,杩欎釜鍥炬槸鎬庝箞鐢诲嚭鏉ョ殑
    绛旓細鏄敤surf鍑芥暟 姣斿 X = 1:50;Y = 1:50;Z=Y'*X;surf(X,Y,Z)shading interp colorbar
  • 姹楂樻墜matlab鐢诲浘!姹傜▼搴!
    绛旓細鍛冣︹︾粰浣犱竴涓渶鐩寸櫧鐨勭▼搴忊︹=7840;hg=0.9;b=1.124;L=2.34; 尾=0.75;杩欓噷杈撳叆浣犻偅涓叕寮忊︹;plot(Ff1,Ft2) %鐢诲嚭绌鸿浇鏇茬嚎 hold on G=12250;hg=0.8;b=1.124;L=2.34;尾=0.75;鍐嶆杈撳叆浣犻偅涓叕寮忊︹;plot(Ff1,Ff2) %鐢诲嚭婊¤浇鏇茬嚎 hold on Ff2=1/3*Ff1;plot(Ff1,...
  • 姹matlab楂樻墜鐢诲浘,璇烽棶涓嬮潰鐨勫浘濡備綍鐢matlab鐢鍑烘潵鍟?
    绛旓細鏈夋暟鎹悧锛熺敾鐨勬椂鍊欑敤stairs杩欎釜鍑芥暟銆
  • 璇楂樻墜鎸囩偣涓杩MATLAB绋嬪簭璁蹭粈涔?
    绛旓細璇楂樻墜鎸囩偣涓杩MATLAB绋嬪簭璁蹭粈涔堬紵clear all;close all;example=1; %This is the first image A=load('testData.txt');im=zeros(36,18);for i=1:36 for j=1:18 im(i,j)=A(example,(i-1)*18+(j));end end imagesc(im);colormap gray;鍥炵瓟锛歝lear all; %娓呴櫎鍙橀噺绌洪棿鍏朵粬闈炲父椹...
  • matlab鐢诲浘,楂樻墜甯繖鍟
    绛旓細1:50;y1=40+sqrt(2500-x.^2);y2=-40-sqrt(2500-x.^2);plot(x,y1,x,y2)axis([-100 100 -100 100])line([-50 50 50 -50 -50],[40 40 -40 -40 40])line([-100 -50],[0 0]);line([50 100],[0 0]);h=line([-50 50],[0 0])set(h,'linestyle','--');...
  • 璇烽棶杩欑鍥惧湪matlab涓搴旇鎬庝箞鐢
    绛旓細浣跨敤plot3鐢诲涓渾鍗冲彲銆備唬鐮佸涓嬶細clfR = 100; % 鐞冪殑鍗婂緞n = 21; % 鍦嗙殑鏁伴噺N = 30; % 姣忎釜骞抽潰鍦嗙殑鐐规暟t = linspace(0,2*pi,N);for el = linspace(-pi/2, pi/2, n) r = R * cos(el); x = r * cos(t); y = r * sin(t); z = R * si...
  • 扩展阅读:对镜c好不好 ... 免费的ai图片生成器 ... 免费ai生成图片网站 ... 看镜子里我们的结合的地方 ... 对着镜子do i ... 等你浪够了你也烂透了说说 ... 把冰块一块块推进去的游戏 ... 他手不安分的向下游走 ... 宝贝抬头看镜子里的你视频 ...

    本站交流只代表网友个人观点,与本站立场无关
    欢迎反馈与建议,请联系电邮
    2024© 车视网