22 views (last 30 days)

Hi,

I have a problem with solving of equation, where unknown are vectors (coordinates of set of points: seznamX, seznamY, seznamZ) and my part of the program for solving it is:

syms r x y z

[l, m, n, Q] = solve(2*sqrt((seznamX-x).^2+(seznamY-y).^2+(seznamZ-z).^2)==r*ones(1,e),[x,y,z,r]);

It means I want to interpolate these points [seznamX,seznamY,seznamZ] with sphere and find its centre.

After running the program, it stops after the line [l, m, n, Q] , where a work with l. It returns me "Error in sym/subsasgn".

Where is the problem and how could I solve it?

Thank you for reply.

darova
on 14 Jan 2020 at 21:02

You should create a system of equations. You need 4 points and 4 equations

syms x0 y0 z0 r0

eq1 = (x0-x(1))^2 + (y0-y(1))^2 + (z0-z(1))^2 == r0^2;

% ...

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 0 Comments

Sign in to comment.