Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. %start_conduction - массив из 3 -х элементов. 1-й элемент - цифра 1, если
  2. %дана действительная часть и 0 - если мнимая; 2-й и 3-й элементы - точка и
  3. %значение функции в этой точке соответственно.
  4. function [ lost_part ] = revive_func( start_part, start_condition)
  5. syms x y x0 y0 real
  6. %check func to harm
  7. if (diff(start_part, x, 2)+diff(start_part, y, 2)~=0)
  8. disp('Function is not harmonic')
  9. return;
  10. end
  11. if (start_condition(1)==1)
  12. dV=[-diff(start_part, y), diff(start_part, x)];
  13. V1=int(dV(1), x, x0, x);
  14. V1=subs(V1, y, y0);
  15. V2=int(dV(2), y, y0, y);
  16. lost_part=simplify(V1+V2);
  17. end
  18. if (start_condition(1)==0)
  19. dU=[diff(start_part, y), -diff(start_part, x)];
  20. U1=int(dU(1), x, x0, x);
  21. U1=subs(U1, y, y0);
  22. U2=int(dU(2), y, y0, y);
  23. lost_part=simplify(U1+U2);
  24. else
  25. disp('Fail condition at first element');
  26. return;
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement