plotting a 3d function(each variable along an axis) and its output(color)

i have a function f(x,y,z) calculated at different x,y,z and now i want to visualise it. i just want to see what is it like on a unit sphere, which means the result i hope to see is a sphere with different colors on it at different points indicatings the output at that particular point(x,y,z). As far as i have searched, i only got the method of generating a sphere without having the colors showing the output value. what can i do?

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 7 月 20 日
You could try scatter3
[X,Y,Z] = sphere(16);
scatter3(X(:),Y(:),Z(:),[],Z(:))

カテゴリ

ヘルプ センター および File ExchangeColor and Styling についてさらに検索

製品

リリース

R2021a

質問済み:

2021 年 7 月 20 日

回答済み:

2021 年 7 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by