본문 바로가기

graph2

Matlab Plot Function, Basic and Useful Tips Matlab Plot Function, Basic and Useful Tips the flower of Matlab is drawing a graph. I will share the codes I use often, so please freely scrape them and correct them. 1. Basic Code %% Setting dt = 0.0001; % time step t = 0:dt:0.08; % time V = 220*sin(2*pi*60*t); % Data %% Plot plot(t,V) I drew 220V, 60Hz voltages for explanation. The dt in the second line is the time step of the graph, which is.. 2020. 9. 24.
매트랩 plot 함수 기본 및 은근히 자주 쓰는 팁 매트랩 plot 함수 기본 및 은근히 자주 쓰는 팁 매트랩의 꽃은 그래프 그리기가 아닐까 싶다. 평소 자주 쓰는 코드들을 공유할테니 자유롭게 긁어가서 수정하길. 1. 기본 코드 %% Setting dt = 0.0001; % time step t = 0:dt:0.08; % time V = 220*sin(2*pi*60*t); % Data %% Plot plot(t,V) 설명을 위해 220V, 60Hz 전압을 그려보았다. 둘 째줄에 있는 dt는 그래프의 time step으로 얼마의 간격으로 그래프에 점을 찍을 것인가에 관한 간격이다. 해상도와 같은 개념이라 생각하면 편하다. 만약 time step이 너무 짧으면 실행 시간이 오래 걸리게 되고, 반면 너무 길면 그래프가 일그러질 수 있으니 선정에 주의해야한다. .. 2020. 8. 1.
반응형