레이블이 Matlab인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Matlab인 게시물을 표시합니다. 모든 게시물 표시

2013년 6월 20일 목요일

Typical orbits

회전체 모드해석 수업때 이종원 교수님 강의 중 나온 내용.
Matlab으로 그려본 것.
그림만 봐도 spectrum 해석하기 이전에 분석할 수 있음.


Hypocycloid

Hypotrochoid

Epitrochoid

Epitrochoid 와 Hypotrochoid에 대한 추가 문서 : http://www.durangobill.com/Trochoids.html


2012년 5월 31일 목요일

Confidence interval in Matlab

있는지 모르지만, 대충 만들어본 confidence interval 구하는 함수 (matlab).

function x = getCI(alpha, stdev, sz)
    %Normal inverse cumulative distribution function
    cc = norminv([alpha/2 1-alpha/2],0,1);
    cc = cc(2);
    x = cc *  stdev / sqrt(sz);


사용은 아래처럼


  • conf95_c = getCI(0.05, stdev, length(A));


Excel의 CONFIDENCE 함수와 동일


참고 페이지
http://support.microsoft.com/kb/828124

2012년 5월 18일 금요일

Matlab 정수로 파일 저장

1) 실수 형태로 저장이 됨.
savefile = 'a.txt';

save savefile B -ascii;

2) Matlab 정수로 파일 저장

fid = fopen('data.txt', 'wt');
for i = 1:length(B)
    fprintf(fid,'% g\t% g\t% g\t% g\n',B(i,1), B(i,2), B(i,3), B(i,4) );
end
fclose(fid);

bb = uint8(B); 로 하면 정수형태가 되나 save 명령으로 저장이 안됨.



http://www.mathworks.com/matlabcentral/newsreader/view_thread/255696

2012년 4월 21일 토요일

Skipping items in a legend

Each curve has a handle, which can be obtained from the properties.



h1 = plot(rand(1,10));      % Blue line
hold on;
h2 = plot(rand(1,10),'r');  % Red line
h3 = plot(rand(1,10),'g');  % Green line
legend([h1 h3],{'hello','world'});  % Only the blue and green lines appear
                                    %   in the legend


http://www.mathworks.com/matlabcentral/answers/406-how-do-i-skip-items-in-a-legend

2012년 3월 16일 금요일

Gaussian profile of Illustrator format


Illustrator source : Download
profile calculated from Matlab