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函 數 的 輸 入 和 輸 出• 一 個 函 數 可 以 有 多 輸 入 及 輸 出• func3.m 可 接 受 兩 個 輸 入 並 產 生 兩 個 輸 出>> type func3.mfunction [ave1, ave2] = func3(vector1, vector2);ave1 = sum(vector1)/length(vector1);ave2 = sum(vector2)/length(vector2);• func3.m 的 呼 叫 方 式>> [a, b] = func3([1 2 3], [4 5 6 7 8])a =2b =6109

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

Saved successfully!

Ooh no, something went wrong!