How can I get all possible coordinate from implicit function ?

조회 수: 2 (최근 30일)
Teerapong Poltue
Teerapong Poltue 2020년 11월 5일
댓글: Teerapong Poltue 2020년 11월 5일
How can I get all possible coordinate (x,y,z) from this function function
cos(x) + cos(y) + cos(z) = 0
I've tried this but, it did work.
syms X Y Z z
counter = 1;
for x = -5:5
for y = -5:5
Data.X(counter) = x;
Data.Y(counter) = y;
Data.Z(counter) = solve(cos(x) + cos(y) + cos(z) == 0,z);
counter = counter + 1 ;
end
end

채택된 답변

Sean de Wolski
Sean de Wolski 2020년 11월 5일
편집: Sean de Wolski 2020년 11월 5일
zz = acos(-(cos(-5:5)+cos((-5:5).')))
% Check
norm(cos(-5:5) + cos((-5:5).') + cos(zz))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by