The circirc function is giving me assert problems, so is the assert function.
I will not link the whole question, since that would be defeating the purpose of actually working on the code and learning.
The question will get more complicated deep through, but the starting point is finding the points of intesection of two circles of variable centers and radii.
PS. I'm a uni student and MATLAB is not fun at all for me. The code might look terribly hideous and I apologize for that. Can someone give tips to start enjoying MATLAB more and have a faster and more effective way of learning all its functionalities. Thanks in advance.
PPS. This code is due to next week and I would really appreciate a quick reply! Thanks again <3
Here is the code:
%DEFINE INPUT PARAMETERS%
syms x y
A = [x y];
B = [x y];
C = [x y];
D = [x y];
AB = norm(A-B);
CD = norm(C-D);
AC = norm(A-C);
%ASSUMPTIONS%
assume(x, 'real');
assume(y, 'real');
assume(AB > 0 );
assume(CD > 0 );
assume(AC > 0 );
%FINDING INTERSECTION%
assert(AB > 0 && CD > 0); %what is happening here?%
[xint, yint] = circcirc(A(1),A(2),AB,C(1),C(2),CD);
%Error using assert
Assertion failed.
Error in problem_geogebra1 (line 61)
assert(AB > 0 && CD > 0);%
E = [xint(1), yint(1)];
F = [xint(2), yint(2)];