SHARE
TWEET

Untitled

a guest Dec 2nd, 2019 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %Exercise
  2. %x input = 0:0.1:14
  3. %y vector is [0.1 0.2 0.4 0.7 0.9]
  4. %original equation: x(y)=1-1/sqrt(1-y^2)*exp(-y*x).*sin(sqrt(1-y^2).*x+acos(y))
  5. %1-1/sqrt(1-0.1^2)*exp(-0.1*x).*sin(sqrt(1-0.1^2).*x+acos(0.1))
  6. x=input('please input the x value for the range of the function plotted:   ')
  7. x1=1-1/sqrt(1-0.1^2)*exp(-0.1*x).*sin(sqrt(1-0.1^2).*x+acos(0.1));
  8. x2=1-1/sqrt(1-0.2^2)*exp(-0.2*x).*sin(sqrt(1-0.2^2).*x+acos(0.2));
  9. x3=1-1/sqrt(1-0.4^2)*exp(-0.4*x).*sin(sqrt(1-0.4^2).*x+acos(0.4));
  10. x4=1-1/sqrt(1-0.7^2)*exp(-0.7*x).*sin(sqrt(1-0.7^2).*x+acos(0.7));
  11. x5=1-1/sqrt(1-0.9^2)*exp(-0.9*x).*sin(sqrt(1-0.9^2).*x+acos(0.9));
  12. plot(x,x1,x,x2,x,x3,x,x4,x,x5, 'm'), xlabel('x in radians'), ylabel('y(x)'), title('1-1/sqrt(1-\zeta^2)*exp(-\zeta*x).*sin(sqrt(1-\zeta^2)*x+acos(\zeta))'),grid,legend('\zeta1','\zeta2','\zeta3','\zeta4','\zeta5')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top