📄 untitled.html
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--This HTML is auto-generated from an M-file.To make changes, update the M-file and republish this document. --> <title>Untitled</title> <meta name="generator" content="MATLAB 7.0.1"> <meta name="date" content="2006-03-20"> <meta name="m-file" content="Untitled"><style>body { background-color: white; margin:10px;}h1 { color: #990000; font-size: x-large;}h2 { color: #990000; font-size: medium;}p.footer { text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;}pre.codeinput { margin-left: 30px;}span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}span.untermstring {color: #B20000}span.syscmd {color: #B28C00}pre.showbuttons { margin-left: 30px; border: solid black 2px; padding: 4px; background: #EBEFF3;}pre.codeoutput { color: gray; font-style: italic;}pre.error { color: red;}/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows. On Gecko-based browsers, the shrink-to-fit doesn't work. */ p,h1,h2,div { /* for MATLAB's browser */ width: 600px; /* for Mozilla, but the "width" tag overrides it anyway */ max-width: 600px; /* for IE */ width:expression(document.body.clientWidth > 620 ? "600px": "auto" );} </style></head> <body><pre class="codeinput">clear <span class="string">all</span>;r0=1;th = [0:pi/50:2*pi]';x = cos(th)*r0;y = sin(th)*r0;cnum=7;rc=0.3;cleft=-1; cright=1;<span class="keyword">for</span> j=1:50 clf axis([-1 1 -1 1]); axis(<span class="string">'equal'</span>),xlabel(<span class="string">'x'</span>), ylabel(<span class="string">'y'</span>); plot(x,y); hold <span class="string">on</span>; a=cleft+(cright-cleft)*rand(1,cnum); b=cleft+(cright-cleft)*rand(1,cnum); <span class="keyword">for</span> i=1:cnum axis([-1 1 -1 1]); axis(<span class="string">'equal'</span>),xlabel(<span class="string">'x'</span>), ylabel(<span class="string">'y'</span>); cx = a(i)+cos(th)*rc; cy = b(i)+sin(th)*rc; plot(cx,cy); <span class="keyword">end</span> pause(0.001)<span class="keyword">end</span>hold <span class="string">off</span>;<span class="comment">%plot(x,y,x,y1);</span></pre><img vspace="5" hspace="5" src="Untitled_01.png"> <p class="footer"><br> Published with MATLAB® 7.0.1<br></p> <!--##### SOURCE BEGIN #####clear all;
r0=1;
th = [0:pi/50:2*pi]';
x = cos(th)*r0;
y = sin(th)*r0;
cnum=7;
rc=0.3;cleft=-1; cright=1;
for j=1:50
clf
axis([-1 1 -1 1]);
axis('equal'),xlabel('x'), ylabel('y');
plot(x,y);
hold on;
a=cleft+(cright-cleft)*rand(1,cnum);
b=cleft+(cright-cleft)*rand(1,cnum);
for i=1:cnum
axis([-1 1 -1 1]);
axis('equal'),xlabel('x'), ylabel('y');
cx = a(i)+cos(th)*rc;
cy = b(i)+sin(th)*rc;
plot(cx,cy);
end
pause(0.001)
end
hold off;
%plot(x,y,x,y1);
##### SOURCE END #####--> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -