Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %start_conduction - массив из 3 -х элементов. 1-й элемент - цифра 1, если
- %дана действительная часть и 0 - если мнимая; 2-й и 3-й элементы - точка и
- %значение функции в этой точке соответственно.
- function [ lost_part ] = revive_func( start_part, start_condition)
- syms x y x0 y0 real
- %check func to harm
- if (diff(start_part, x, 2)+diff(start_part, y, 2)~=0)
- disp('Function is not harmonic')
- return;
- end
- if (start_condition(1)==1)
- dV=[-diff(start_part, y), diff(start_part, x)];
- V1=int(dV(1), x, x0, x);
- V1=subs(V1, y, y0);
- V2=int(dV(2), y, y0, y);
- lost_part=simplify(V1+V2);
- end
- if (start_condition(1)==0)
- dU=[diff(start_part, y), -diff(start_part, x)];
- U1=int(dU(1), x, x0, x);
- U1=subs(U1, y, y0);
- U2=int(dU(2), y, y0, y);
- lost_part=simplify(U1+U2);
- else
- disp('Fail condition at first element');
- return;
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement