The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa.
For example,
>> project.name = MyProject
>> project.id = 1234
>> project.param.a = 3.1415
>> project.param.b = 42
becomes with str=xml_format(project, off )
"<project>
<name>MyProject</name>
<id>1234</id>
<param>
<a>3.1415</a>
<b>42</b>
</param>
</project>"
On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
標簽:
converts
Toolbox
complex
logical
上傳時間:
2016-02-12
上傳用戶:a673761058
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; %產生3 × 3的全1數組
%B=conv2(J,h); %卷積運算
%采用MATLAB中的函數對噪聲干擾的圖像進行濾波
Q=wiener2(J,[3 3]); %對加噪圖像進行二維自適應維納濾波
P=filter2(fspecial('average',3),J)/255; %均值濾波模板尺寸為3
K1=medfilt2(J,[3 3]); %進行3 × 3模板的中值濾波
K2= medfilt2(J,[5 5]); %進行5 × 5模板的中值濾波
K3= medfilt2(J,[7 7]); %進行7 × 7模板的中值濾波
K4= medfilt2(J,[9 9]); %進行9 × 9模板的中值濾波
%顯示濾波后的圖像及標題
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模板的中值濾波的圖像');
標簽:
matlab
均值濾波
中值濾波
上傳時間:
2016-06-02
上傳用戶:wxcr_1
實驗源代碼
//Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("請輸入矩陣第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可傳遞閉包關系矩陣是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元關系的可傳遞閉包\n"); void warshall(int,int); int k , n; printf("請輸入矩陣的行數 i: "); scanf("%d",&k);
四川大學實驗報告 printf("請輸入矩陣的列數 j: "); scanf("%d",&n); warshall(k,n); }
標簽:
warshall
離散
實驗
上傳時間:
2016-06-27
上傳用戶:梁雪文以
This edition updates and continues the series of books based on the residential
courses on radiowave propagation organised by the IEE/IET.
The first course was held in 1974, with lectures by H. Page, P. Matthews,
D. Parsons, M.W. Gough, P.A. Watson, E. Hickin, T. Pratt, P. Knight, T.B. Jones,
P.A. Bradley, B. Burgess and H. Rishbeth.
標簽:
Propagation
Radiowaves
edition
3rd
of
上傳時間:
2020-05-31
上傳用戶:shancjb