Advertisement
DanSt3fan

s219

May 22nd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.40 KB | None | 0 0
  1. SCRIPT S219
  2. function A = s219(a,h,b)
  3. f=@(x) x.*(x+3.*(x+3.*(x+3.*(x+3).^2).^2).^2).^2;
  4. A=[];
  5. j=1;
  6. for i=a:h:b
  7.     A(j,1)=j;
  8.     A(j,2)=i;
  9.     A(j,3)=f(i);
  10.     j=j+1;
  11. end
  12. end
  13. COD S219
  14. a=input('Inceputul intervalului:');
  15. b=input('Sfarsitul intervalului:');
  16. h=input('Pasul intervalului:');
  17. A=s219(a,h,b);
  18. plot(A(:,3),A(:,2),'-d','Color',[0.1 0.3 0],'LineWidth',1)
  19. disp('Matricea este:');
  20. disp(A)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement