12.07.2015 Views

Matlab/Octave Tutorial

Matlab/Octave Tutorial

Matlab/Octave Tutorial

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.

MATLAB 程 式 設 計 入 門 篇 : 初 探 MATLAB向 量 的 p-norm• 一 個 向 量 a 的 p-norm 可 以 定 義 為1/ ppa a , p 1piip=2 時 , 此 即 為 向 量 a 的 長 度 , 或 稱 歐 氏 長 度(Euclidean Length)• 欲 求 一 向 量 的 p-norm, 可 使 用 norm 指 令norm(x,p)• 範 例 9-18: normVector01.ma = [3 4];x = norm(a, 1) % x = 7y = norm(a, 2) % y = 5norm(a,1)norm(a,inf)z = norm(a, inf) % z = 4 i i82iaimaxa

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

Saved successfully!

Ooh no, something went wrong!