-
用subplot分別在不同的坐標(biāo)系下作出下列四條曲線,為每幅圖形加上標(biāo)題
標(biāo)簽:
subplot
分
坐標(biāo)系
上傳時(shí)間:
2015-05-14
上傳用戶:Yukiseop
-
先確定二分法的上下兩個(gè)端點(diǎn)值,這個(gè)在figure的subplot(121)中確定。
然后進(jìn)行循環(huán)求解。
標(biāo)簽:
subplot
figure
121
分
上傳時(shí)間:
2013-12-26
上傳用戶:gengxiaochao
-
在命令窗輸入如下內(nèi)容就得到圖形了:
[t,x]=ode45( godhua ,[0,10],[0,0,0,1])
subplot(131) plot(t,x(:,4)) xlabel( t ) ylabel( y )
subplot(132) plot(t,x(:,1)) xlabel( t ) ylabel( v )
subplot(133) plot(t,x(:,2)) xlabel( t ) ylabel( \theta )
標(biāo)簽:
subplot
godhua
xlabel
plot
上傳時(shí)間:
2013-12-25
上傳用戶:15736969615
-
y3k=fft(u,(m+n-2)/4)
i=1:(m+n-2)/4
subplot(5,2,9) stem(i,u)
title( 濾波后上采樣 )
k=1:(m+n-2)/4
subplot(5,2,10) stem(k,y3k)
title( 上采樣頻譜 )
xlabel( k ) ylabel( y3k )
標(biāo)簽:
subplot
title
stem
fft
上傳時(shí)間:
2013-12-18
上傳用戶:zhliu007
-
暫時(shí)只支持jpeg2000支持的 cdf97 和spline53
可以這樣來測(cè)試:
x=imread( E:\study\jpeg2000\images\lena.tif )
% see the decomposition coefficients
y=wavelift(x, 1, spl53 ) using spline 5/3 wavelet
figure subplot(1,2,1) imshow(x) subplot(1,2,2) imshow(mat2gray(y))
% see the reconstruction precision
yy=wavelift(x, 5) using cdf 9/7 wavelet
ix=wavelift(yy,-5) inverse
sum(sum((double(x)-ix).^2))
標(biāo)簽:
2000
imageslena
studyjpeg
imread
上傳時(shí)間:
2014-01-14
上傳用戶:懶龍1988
-
I=imread('fig1.jpg');%從D盤名為myimages的文件夾中讀取。格式為jpg的圖像文件chost
J=imnoise(I,'salt & pepper',0.02);%給圖像加入均值為0,方差為0.02的淑鹽噪聲
subplot(2,4,1);
imshow(I);
title('原始圖像');
subplot(2,4,2);
imshow(J);
title('加入椒鹽噪聲之后的圖像');
%h=ones(3,3)/9; %產(chǎn)生3 × 3的全1數(shù)組
%B=conv2(J,h); %卷積運(yùn)算
%采用MATLAB中的函數(shù)對(duì)噪聲干擾的圖像進(jìn)行濾波
Q=wiener2(J,[3 3]); %對(duì)加噪圖像進(jìn)行二維自適應(yīng)維納濾波
P=filter2(fspecial('average',3),J)/255; %均值濾波模板尺寸為3
K1=medfilt2(J,[3 3]); %進(jìn)行3 × 3模板的中值濾波
K2= medfilt2(J,[5 5]); %進(jìn)行5 × 5模板的中值濾波
K3= medfilt2(J,[7 7]); %進(jìn)行7 × 7模板的中值濾波
K4= medfilt2(J,[9 9]); %進(jìn)行9 × 9模板的中值濾波
%顯示濾波后的圖像及標(biāo)題
subplot(2,4,3);
imshow(Q);
title('3 × 3模板維納濾波后的圖像');
subplot(2,4,4);
imshow(P);
title('3 × 3模板均值濾波后的圖像');
subplot(2,4,5);
imshow(K1);
title('3 × 3模板的中值濾波的圖像');
subplot(2,4,6);
imshow(K2);
title('5 × 5模板的中值濾波的圖像');
subplot(2,4, 7);
imshow(K3);
title('7 × 7模板的中值濾波的圖像');
subplot(2,4,8);
imshow(K4);
title('9 × 9模板的中值濾波的圖像');
標(biāo)簽:
matlab
均值濾波
中值濾波
上傳時(shí)間:
2016-06-02
上傳用戶:wxcr_1
-
簡(jiǎn)單的實(shí)現(xiàn)JPEG圖像壓縮編碼方法一
clear all;
RGB=imread('C:\Users\Administrator\Desktop\123.bmp');%讀取內(nèi)存中bmp格式的彩色圖像
I=rgb2gray(RGB);%將彩色圖像轉(zhuǎn)換為灰度圖像
I1=im2double(I);%將圖像變換為雙精度格式
T=dctmtx(8);%處理后返回一個(gè)8*8階的DCT矩陣
B1=blkproc(I1,[8
8],'P1*x*P2',T,T');%對(duì)圖像的每個(gè)8*8子塊應(yīng)用矩陣式‘P1*x*P2(像素塊的處理函數(shù),x是形式參數(shù))進(jìn)行處理,P1=T,P2=T’
mask=[1 1 1 1 0 0
0 0
1 1 1 0 0 0 0 0
1 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 ];%選取10個(gè)DCT系數(shù)重構(gòu)圖像(DCT具有能量集中的性質(zhì),數(shù)據(jù)集中在左上角,故進(jìn)行圖像壓縮時(shí)離散余弦變換矩陣可以舍棄右下角的高頻數(shù)據(jù))
B2=blkproc(B1,[8
8],'P1.*x',mask);%舍棄每個(gè)塊中的高頻系數(shù),達(dá)到壓縮的目的
I2=blkproc(B2,[8
8],'P1*x*P2',T',T);%余弦反變換,重構(gòu)圖像
subplot(2,2,1);imshow(RGB);%原彩色圖像
subplot(2,2,2);imshow(I);%灰度圖像
subplot(2,2,3);imshow(I1);%雙精度灰度圖像
subplot(2,2,4);imshow(I2);%重構(gòu)圖像
標(biāo)簽:
matlab
上傳時(shí)間:
2018-03-15
上傳用戶:wlmelody
-
%球體
close all;
G=6.67e-11;
R=2;%球體半徑
p=4.0;%密度
D=10.0;%深度
M=(4/3)*pi*R^3*p;%質(zhì)量
x=-20:1:20;
g=G*M*D./((x.^2+D^2).^(3/2));
Vxz=-3*G*M*D.*x./((x.^2+D^2).^(5/2));
Vzz=G*M.*(2*D^2-x.^2)./((x.^2+D^2).^(5/2));
Vzzz=3*G*M.*(2*D^2-3.*x.^2)./((x.^2+D^2).^(7/2));
subplot(2,2,1)
plot(x,g,'k-');
xlabel('水平距離(m)');
ylabel('重力異常值');
title('球體重力異常Δg');
grid on
subplot(2,2,2)
plot(x,Vxz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vxz');
grid on
subplot(2,2,3)
plot(x,Vzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzz');
grid on
subplot(2,2,4);
plot(x,Vzzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzzz');
grid on
%%
%水平圓柱體
close all
G=6.67e-11;
p=10.0;%線密度
D=100.0;%深度
x=-200:1:200;
g=G*2*p*D./(x.^2+D^2);
Vxz=4*G*p*D.*x./(x.^2+D^2).^2;
Vzz=2*G*p.*(D^2-x.^2)./(x.^2+D^2).^2;
Vzzz=4*G*p.*(D^2-3.*x.^2)./((x.^2+D^2).^3);
subplot(2,2,1)
plot(x,g,'k-');
xlabel('水平距離(m)');
ylabel('重力異常值');
title('水平圓柱體重力異常Δg');
grid on
subplot(2,2,2)
plot(x,Vxz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vxz');
grid on
subplot(2,2,3)
plot(x,Vzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzz');
grid on
subplot(2,2,4);
plot(x,Vzzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzzz');
grid on
%%
%垂直臺(tái)階
G=6.67e-11;
p=4.0;%密度
h1=50.0;%下層深度
h2=40.0;%上層深度
x=-100:1:100;
g=G*p.*(pi*(h1-h2)+x.*log((x.^2+h1^2)./(x.^2+h2^2))+2*h1.*atan(x./h1)-2*h2.*atan(x./h2));
Vxz=G*p.*log((h1^2+x.^2)./(h2^2+x.^2));
Vzz=2*G*p.*atan((x.*(h1-h2))./(x.^2+h1*h2));
Vzzz=2*G*p.*x*(h1^2-h2^2)./((h1^2+x.^2).*(x.^2+h2^2));
subplot(2,2,1)
plot(x,g,'k-');
xlabel('水平距離(m)');
ylabel('重力異常值');
title('垂直臺(tái)階重力異常Δg');
grid on
subplot(2,2,2)
plot(x,Vxz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vxz');
grid on
subplot(2,2,3)
plot(x,Vzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzz');
grid on
subplot(2,2,4);
plot(x,Vzzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzzz');
grid on
%%
%傾斜臺(tái)階
G=6.67e-11;
p=4.0;%密度
h1=50.0;%下層深度
h2=40.0;%上層深度
a=pi/6;%傾斜角度
x=-500:1:500;
g=G*p.*(pi*(h1-h2)+2*h1.*atan((x+h1*cot(a))./h1)-2*h2.*atan((x+h2*cot(a))./h1)+x.*sin(a)^2.*log(((h1+x.*sin(a).*cos(a)).^2+x.^2.*sin(a)^4)./((h2+x.*(sin(a)*cos(a))).^2+x.^2.*sin(a)^4)));
Vxz=G*p.*(sin(a)^2.*log(((h1*cot(a)+x).^2+h1^2)./((h2*cot(a)+x).^2+h2^2))-2*sin(2*a).*(atan((h1/sin(a)+x.*cos(a))./(x.*sin(a)))-atan((h2/sin(a)+x.^cos(a))./(sin(a).*x))));
Vzz=G*p.*(0.5*sin(2*a)^2.*log(((h1*cot(a)+x).^2+h1^2)./((h2*cot(a)+x).^2+h2^2))+2*sin(a)^2.*(atan((h1/sin(a)+x.*cos(a))./(x.*sin(a)))-atan((h2/sin(a)+x.*cos(a))./(x.*sin(a)))));
Vzzz=2*G*p*sin(a)^2.*((x+2*h2*cot(a))./((h2*cot(a)+x).^2+h2^2)-(x+2*h1*cot(a))./((h1*cot(a)+x).^2+h1^2));
subplot(2,2,1)
plot(x,g,'k-');
xlabel('水平距離(m)');
ylabel('重力異常值');
title('傾斜臺(tái)階重力異常Δg');
grid on
subplot(2,2,2)
plot(x,Vxz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vxz');
grid on
subplot(2,2,3)
plot(x,Vzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzz');
grid on
subplot(2,2,4);
plot(x,Vzzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzzz');
grid on
%%
%鉛錘柱體
G=6.67e-11;
p=4.0;%密度
h1=50.0;%下層深度
h2=40.0;%上層深度
a=3;%半徑
x=-500:1:500;
g=G*p.*((x+a).*log(((x+a).^2+h1^2)./((x+a).^2+h2^2))-(x-a).*log(((x-a).^2+h1^2)./((x-a).^2+h2^2))+2*h1.*(atan((x+a)./h1)-atan((x-a)./h1))-2*h2.*(atan((x+a)./h2)-atan((x-a)./h2)));
Vxz=G*p.*log((((x+a).^2+h1^2).*((x-a).^2+h2^2))./(((x+a).^2+h2^2).*((x-a).^2+h1^2)));
Vzz=2*G*p.*(atan(h1./(x+a))-atan(h2./(x+a))-atan(h1./(x-a))+atan(h2./(x-a)));
Vzzz=2*G*p.*((x+a)./((x+a).^2+h2^2)-(x+a)./((x+a).^2+h1^2)-(x-a)./((x-a).^2+h2^2)+(x-a)./((x-a).^2+h1^2));
subplot(2,2,1)
plot(x,g,'k-');
xlabel('水平距離/m')
ylabel('重力異常值')
title('鉛垂柱體重力異常')
grid on
subplot(2,2,2)
plot(x,Vxz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vxz');
grid on
subplot(2,2,3)
plot(x,Vzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzz');
grid on
subplot(2,2,4);
plot(x,Vzzz);
xlabel('水平距離(m)');
ylabel('導(dǎo)數(shù)值');
title('Vzzz');
grid on
標(biāo)簽:
MATLAB
重力
正
程序
上傳時(shí)間:
2019-05-10
上傳用戶:xiajiang
-
x=[1,2,0,-1,3,2];h=[1,-1,1];
y1=x*h(1);
y2=x*h(2);
y3=x*h(3);
Y1=[0,0,y1];
Y2=[0,y2,0];
Y3=[y3,0,0];
y=Y1+Y2+Y3;
L=-2:1:5;
figure(1);
subplot(211);stem(L,y,'*');
xlabel('L');ylabel('y');title('(1)');
X=x.';X=X';
r1=X*y(1);r2=X*y(2);r3=X*y(3);r4=X*y(4);
r5=X*y(5);r6=X*y(6);r7=X*y(7);r8=X*y(8);
R1=[0,0,0,0,0,0,0,r1];R2=[0,0,0,0,0,0,r2,0];
R3=[0,0,0,0,0,r3,0,0];R4=[0,0,0,0,r4,0,0,0];
R5=[0,0,0,r5,0,0,0,0];R6=[0,0,r6,0,0,0,0,0];
R7=[0,r7,0,0,0,0,0,0];R8=[r8,0,0,0,0,0,0,0];
R=R1+R2+R3+R4+R5+R6+R7+R8;
n=-7:5;
subplot(212);stem(n,R);title('(2)');
標(biāo)簽:
ketang
上傳時(shí)間:
2020-11-10
上傳用戶: