Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. a1 = 1.38;
  2.  
  3. a2 = 0.3108;
  4.  
  5. a3 = 0.6671;
  6.  
  7. a4 = 0.3192;
  8.  
  9. a5 = 0.9714;
  10.  
  11. a6 = 0.4783;
  12.  
  13. a7 = -9.493;
  14.  
  15. a8 = 0.1478;
  16.  
  17. c1 = 1.094;
  18.  
  19. c2 = 0.001242;
  20.  
  21. c3 = 0.7892;
  22.  
  23. c4 = 1.287;
  24.  
  25. c5 = 0.2025;
  26.  
  27. c6 = 0.6889;
  28.  
  29. c7 = 0.03396;
  30.  
  31. c8 = 0.8076;
  32.  
  33.  
  34. f2 = chebfun(@(x) (a1*exp(-((x)/c1)^2) + a2*abs(x)*exp(-((x)/c2)^2) + a3*x^2*exp(-((x)/c3)^2) + a4*abs(x)^3*exp(-((x)/c4)^2) + a5*x^4*exp(-((x)/c5)^2) + a6*abs(x)^5*exp(-((x)/c6)^2) + a7*x^6*exp(-((x)/c7)^2) + a8*abs(x)^7*exp(-((x)/c8)^2)), [-50,50]);
  35.  
  36. L = chebop(@(x,u) diff(u,2)/2-x*diff(u,1)/2-f2*u,[-50,50]);
  37.  
  38. L.bc = 'neumann';
  39.  
  40. [V,D] = eigs(L);
  41.  
  42. diag(D)
  43.  
  44. Warning: Function failed to evaluate on array inputs.
  45. Vectorizing the function may speed up its evaluation
  46. and avoid the need to loop over array elements.
  47. Use 'vectorize' flag in the CHEBFUN constructor call
  48. to avoid this warning message.
  49. > In chebfun>vectorCheck (line 913)
  50. In chebfun>parseInputs/parseOp (line 764)
  51. In chebfun>parseInputs (line 755)
  52. In chebfun (line 203)
  53. In main (line 216)
  54. Warning: Function not resolved using 65537 pts. Have you tried
  55. 'splitting on'?
  56. > In chebfun/constructor>constructorNoSplit (line 120)
  57. In chebfun/constructor (line 63)
  58. In chebfun (line 219)
  59. In main (line 216)
  60.  
  61. ans =
  62.  
  63. -2.8005
  64. -2.3387
  65. -1.8797
  66. -1.5001
  67. -1.0001
  68. -0.8883
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement