06.08.2013 Views

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

a_s 1x2 16 double array<br />

ans 1x4 8 char array<br />

b 1x1 2 char array<br />

b_s 1x2 16 double array<br />

Grand total is 10 elements using 50 bytes<br />

3.1.2 串数组的属性和标识<br />

【例 3.1.2-1】本例演示:串的基本属性、标识和简单操作。<br />

(1)<br />

a='This is an example.'<br />

a =<br />

This is an example.<br />

(2)<br />

size(a)<br />

ans =<br />

1 19<br />

(3)<br />

a14=a(1:4)<br />

ra=a(end:-1:1)<br />

a14 =<br />

This<br />

ra =<br />

.elpmaxe na si sihT<br />

(4)<br />

ascii_a=double(a)<br />

ascii_a =<br />

Columns 1 through 12<br />

84 104 105 115 32 105 115 32 97 110 32 101<br />

Columns 13 through 19<br />

120 97 109 112 108 101 46<br />

char(ascii_a)<br />

ans =<br />

This is an example.<br />

(5)<br />

w=find(a>='a'&a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!