I'm going to walk through your code and comment on a few things along the way.
Because Xc is empty so is P1. P1 is not a function of Xc or anything like that. If it were a function of Xc it would be something like:
Continuing on with your code:
Q1 is empty for the same reason P1 is except for Yc instead of Xc.
R1 = Xc.^2 + Yc.^2 + f^2 - a1^2;
R1 and R2 are empty because they're also functions of the empty matrix Xc. An empty plus or minus a scalar is still empty by scalar "expansion".
Part1 = (R1 * Q2) - (R2 * Q1);
Part2 = (P1 * R2) - (P2 * R1);
Part3 = (P1 * Q2) - (P2 * Q1);
Each of these three parts is also empty.
eq = @(Xc,Yc) (Part1.^2 + Part2.^2 - Part3.^2);
So your "function of Xc and Yc" actually doesn't depend on the inputs Xc and Yc at all. It returns the sum and difference of three empty matrices, which means a simpler way of writing eq is:
So when you call fimplicit:
fimplicit (eq,[-100 100 -100 100]);
It passes in something nonempty and receives an empty back. That's why it issues the warning.
You probably want to make Part1, Part2, and Part3 functions of Xc and Yc, which will require making the P#, Q#, and R# lines into functions like I did with P1 (and calling them as functions rather than referring to them as variables.)
Best Answer