Advertisement
Guest User

lab9

a guest
Nov 27th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.95 KB | None | 0 0
  1. %syms t;
  2. %
  3. %x = @(t) 4 + 4*cos(t);
  4. %y = @(t) 1 + 4*sin(t);
  5. %c = @(t) [x(t),y(t)];
  6. %v = [diff(x(t)),diff(y(t))];
  7. %a = [diff(x(t),2),diff(y(t),2)];
  8. %
  9. %ezplot(x(t),y(t));
  10. %
  11. %k = @(t) det([v;a])/sqrt(sum(v.^2))^3;
  12. %disp("Curbura lui e in c(t)");
  13. %disp(k(t));
  14. %R= @(t) 1/abs(k(t));
  15. %disp("raza de curbura in c(t)");
  16. %disp(R(t));
  17. %
  18. %t0 = input("Introduceti valoarea pentru t0");
  19. %disp("Curbura este");
  20. %disp(diff(k(t0)));
  21. %x= diff(k(t0));
  22. %
  23. %if (x != 0)
  24. %  disp("Nu este varf");
  25. %else
  26. %  disp("Este varf");
  27. %endif
  28.  
  29. syms t;
  30. x = @(t) 2+t+t^3;
  31. y = @(t) -t-t^3;
  32. z = @(t) 5+t^3;
  33. ezplot3(x(t),y(t),z(t));
  34.  
  35. d1 = [diff(x(t)),diff(y(t)),diff(z(t))];
  36. d2 = [diff(x(t),2),diff(y(t),2),diff(z(t),2)];
  37. d3 = [diff(x(t),3),diff(y(t),3),diff(z(t),3)];
  38. disp(d1);
  39. disp(d2);
  40. disp(d3);
  41.  
  42. k = simplify(norm(cross(d1,d2))/(norm(d1)^3));
  43. disp(k);
  44. tau = simplify((dot(cross(d1,d2),d3))/norm(cross(d1,d2))^2);
  45. disp(tau);
  46. disp("Verificare elice");
  47. disp(tau/k);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement