edward4324

MCM Lab0 Task2

Sep 27th, 2021 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.91 KB | None | 0 0
  1. %Вариант 5
  2. %1
  3. z = (3 - 5*1i)^(-1);
  4. disp("z = "+ z);
  5. arg_z = angle(z);
  6. disp("angle z = " + arg_z);
  7.  
  8. %2
  9. syms f1(x)
  10. f1(x) = (x^5 + x^4 - 8)/(x^3 - 4*x);
  11. disp(f1(x))
  12. F = int(f1,x);
  13. disp(F)
  14.  
  15. %3
  16.  
  17. tiledlayout(2,2);
  18.  
  19. x = -pi:0.01:pi;
  20. f01 = sin(x).*cos(x);
  21. nexttile;
  22. plot(x, f01,':','Color',[0 0.4470 0.7410],'LineWidth',1.5);
  23. title('asin(1/(x-3)) Шаг 0.01');
  24. grid('on');
  25.  
  26. x = -pi:0.03:pi;
  27. nexttile;
  28. f03 = sin(x).*cos(x);
  29. plot(x, f03,'--.','Color',[1 0 1],'LineWidth',1.5);
  30. title('asin(1/(x-3)) Шаг 0.03');
  31. grid('on');
  32. %legend({', 'asin(1/(x-3)) Шаг 0.03'},'Location','southwest')
  33.  
  34. %4
  35.  
  36. phi = -pi:0.01:pi;
  37. fpolar = 1 + cos(phi);
  38. nexttile;
  39. polarplot(phi, fpolar, '--','Color',[0.9290 0.6940 0.1250],'LineWidth',1.5);
  40. title('1 + cos(phi)');
  41. grid('on');
  42.  
  43. %5
  44. X = -pi:0.1:pi;
  45. Y = -pi:0.1:pi;
  46. Z = max(abs(X), abs(Y));
  47. nexttile;
  48. plot3(X,Y,Z);
  49. title('max(|X|,|Y|)');
  50. grid('on');
Add Comment
Please, Sign In to add comment