Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- //SUITE 1
- function u=suite1(f,u1,n)
- //termes d'une suite
- u=u1
- for i=1:n-1
- u(i+1)=f(u(i))
- end
- plot(u,'-*r')
- xgrid(3)
- disp(u)
- endfunction
- u11=0
- function y=f1(x)
- y=sqrt(x+1)
- endfunction
- u12=0
- function y=f2(x)
- y=0.5*x+2
- endfunction
- u13=1
- function y=f3(x)
- y=sqrt(2*x+1)
- endfunction
- u14=2
- function y=f4(x)
- y=(2*x+1)/(x-4)
- endfunction
- u15=1
- function y=f5(x)
- y=(x/2)+(1/x^2)
- endfunction
- u16=1
- function y=f6(x)
- y=sqrt(cos(x))
- endfunction
- clf
- subplot(2,3,1)
- suite1(f1,u11,20)
- subplot(2,3,2)
- suite1(f2,u12,20)
- subplot(2,3,3)
- suite1(f3,u13,20)
- subplot(2,3,4)
- suite1(f4,u14,20)
- subplot(2,3,5)
- suite1(f5,u15,20)
- subplot(2,3,6)
- suite1(f6,u16,20)
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement