2014년 11월 25일 화요일

octave head method

0.it is same as r head  use like this head(vector)
   it will display first 6 row.
   if its row smaller then 6 it will display size of row

1.make head.m file at your directory

head.m

2.paste below code

function head =  head(X)
    siz = size(X);
    line = 6;
    if siz(1,1) < 6
        line = siz(1,1);
    endif;

    head = X([1:line],:);
end

3.if you want always use this method check this link
http://resoliwan.blogspot.kr/2014/11/octave-add-load-path-permenatly.html