Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. %%**********CALCULO DE LONGITUDES****************%%
  2.  
  3. %%comandos
  4.  
  5. clc
  6. clear
  7. syms x y z
  8. L = y + z
  9. y1 = sqrt(x^2+12^2);
  10. z1 = sqrt((30-x)^2+28^2);
  11.  
  12. L = subs(L, y ,y1);
  13. L = subs(L, z, z1);
  14.  
  15. dLdx = diff(L);
  16. sol = solve(dLdx==0);
  17.  
  18. %disp('El cable debe atarse a' num2str(double(sol)),...|'cm , del poste de
  19. %12 metros'|) REVISAR TODOS LOS DISP
  20.  
  21.  
  22. %************DISTANCIA MAS CORTA DE UNA FUNCIÓN A UN PUNTO*********%
  23. ezplot 4-x^2
  24.  
  25. syms x y
  26. y1 = 4-x^2
  27.  
  28. d = sqrt(x^2+ (y-2)^2);
  29. d = subs(d, y, y1);
  30. dddx = diff(d);
  31.  
  32. sol = solve(dddx==0);
  33. p1 = subs(y1, x, sol(2));
  34. p2 = subs(y1, x, sol(3));
  35.  
  36. %%disp('Las soluciones son' num2str(double(sol)),...
  37.  
  38. %***********HOJA DE PAPEL(PROBLEMA 3)*************%
  39.  
  40. clc
  41. clear
  42. syms x y
  43.  
  44. A = (x+3)+(y+2)
  45. y1 = 24/x;
  46.  
  47. A = subs(A,y,y1);
  48.  
  49. dAdx = diff(A);
  50. sol=solve(dAdx==0);
  51.  
  52. %%disp('las dimensiones son', num2str(double(sol(2),(3))))
  53.  
  54.  
  55. %**************VOLUMEN(PROBLEMA 4)*******************%
  56.  
  57. clc
  58. clear
  59. syms x h
  60.  
  61. S = x^2+ 4*x*h;
  62. h1 = solve(S==100,h)
  63. V=x^2*h;
  64. V = subs(V, h, h1)
  65. dS=diff(V);
  66. sol=solve(dS==0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement