라벨이 연습문제인 게시물 표시

050 Matlab 연습문제 04

연습문제 hold off; for x=-20:1:20     for y=-20:1:20         plot(x,y);         hold on         dt=0.01;         for it=1:1:10;             time=dt*it;             dxdt=9*x+9*y;             dydt=6*x+8*y;             x=x+dxdt*dt;             y=y+dydt*dt;             plot(x,y);             hold on;         end     end end

047 Matlab 연습문제 03

연습문제 clear all %초기 조건 t=1 일때 y=4.2 %구간 1이상 3이하 y=4.2; dt=0.1; k=0; for it=[1:dt:3]     k=k+1;          dydt=(((it)^3)-(2*y))/(it);     y=y+dydt*dt;       T(k)=it;     Y(k)=y;      end  plot(T,Y);

046 Matlab 연습문제 02

연습문제 y0=0;  %높이 y1=800; R=6371; g0=9.81; m=500; dt=0.0001; dU=0; for it=0:dt:800;        g=((R^2)*g0)/((R+it)^2);        dU=dU+(m*g*dt); end du=dU

045 Matlab 연습문제 01

연습문제 y=[42 73 101 136 143 177 205 217 212 194 190 157 141 151]; x=[0:30:390]; a=trapz(x,y)

044 Matlab 연습문제 19

연습문제 a=60; h=15; R=@(x ) sqrt(1+(4*h.^2./a.^4).*x.^2); inte=quad(R,0,a) ans=inte*2

043 Matlab 연습문제 13

연습문제 a=60; h=15; R=@(x ) sqrt(1+(4*h.^2./a.^4).*x.^2); inte=quad(R,0,a) ans=inte*2

042 Matlab 연습문제 11

연습문제 c=3.0*10^8; h=6.63*10^-34; k=1.38*10^-23; T=1500; R=@(lamda ) (2*pi*(c^2)*h)/(lamda^5)*1/(exp((h*c)/(lamda*k*T))-1); fplot(R,linspace(0.2*10^-6, 6.0*10^-6,100)); fminbnd(R,0.2*10^-6,6.0*10^-6)

041 Matlab 연습문제 04

연습문제 m=18; h=10; u=0.55; g=9.81; f=90; x=linspace(-10,10,100); y=((u.*m.*g.*sqrt(x.^2+h.^2))./(x+u.*h))-f; plot(x,y) ans=fzero(func,0) func=@(x ) ((u*m*g*sqrt(x^2+h^2))/(x+u*h))-f

040 Matlab 연습문제

연습문제 x=linspace(-5,5,100) y=exp(-0.2.*x).*cos(2.*x)-0.15.*(x.^2)+1 plot(x,y) p=@(x ) exp(-0.2*x)*cos(2*x)-0.15*(x^2)+1 f=[fzero(p,-4),fzero(p,-2),fzero(p,-1),fzero(p,1),fzero(p,2),fzero(p,3)]