Saturday, 8 August 2015

Matlab in NTUST Advanced----function handle

function handle

function splot1(t, FH)
plot(t,FH(t));
end
command>>
splot(t, @cos);
已經存在的function前加@
用於當作一個function的input

C = bsxfun(fun,A,B) 

fun表示此位置要放function


 

Anonymous Function

簡易運算,不想再建.m file時用
f = @(a, b, c) (a + b + c) / 3
f(1, 2, 3)

TODO/FIXME Report 

%TODO or %FIXME做記號

Code Analyzer Report

matlab自動產生,no message就是pass

Help Report

顯示寫在程式前面的%的內容

Profile Summary

home->run and time

Profile Coverage Report



No comments:

Post a Comment