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
編程題(15_01.c)
結構
Struct student
{
long num
char name[20]
int score
Struct student *next
}
鏈表練習:
(1).編寫函數Struct student * creat(int n),創建一個按學號升序排列的新鏈表,每個鏈表中的結點中
的學號、成績由鍵盤輸入,一共n個節點。
(2).編寫函數void print(Struct student *head),輸出鏈表,格式每行一個結點,包括學號,姓名,分數。
(3).編寫函數Struct student * merge(Struct student *a,Struct student *b), 將已知的a,b兩個鏈表
按學號升序合并,若學號相同則保留成績高的結點。
(4).編寫函數Struct student * del(Struct student *a,Struct student *b),從a鏈表中刪除b鏈表中有
相同學號的那些結點。
(5).編寫main函數,調用函數creat建立2個鏈表a,b,用print輸出倆個鏈表;調用函數merge升序合并2個
鏈表,并輸出結果;調用函數del實現a-b,并輸出結果。
a:
20304,xxxx,75,
20311,yyyy,89
20303,zzzz,62
20307,aaaa,87
20320,bbbb,79
b:
20302,dddd,65
20301,cccc,99
20311,yyyy,87
20323,kkkk,88
20307,aaaa,92
20322,pppp,83
標簽:
student
Struct
score
long
上傳時間:
2016-04-13
上傳用戶:zxc23456789