Colour code to find how big a function is
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Behi
am 26 Mai 2022
Kommentiert: Behi
am 28 Mai 2022
Hi, I have 3D orbit, I want to write a code that pick each points (particularly its x &y not z) on this orbit and then calculate a function
f= (y-x)/1+x^2 correspond to the points on orbit. After that I want color code for the surface for function. In fact, I have to use color code to see how big is the function as we go around the orbit.
I would appreciate if any one could help me.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
KSSV
am 26 Mai 2022
x = linspace(-1,1) ;
y = linspace(-1,1) ;
[X,Y] = meshgrid(x,y) ;
F = (Y-X)./(1+X.^2) ;
surf(X,Y,F)
Siehe auch
Kategorien
Mehr zu Earth and Planetary Science finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!