How to stack-up multiple cases in z axis?
Afficher commentaires plus anciens
I would like to change multiplier term from 1 to 50 with a step of 1 and plot all the shaded area by stacking all the cases up in z axis. Different cases could have different shaded area color to distinguish.
clc
clear
x(1) = 0 ;
y(1) = 0 ;
multiplier = 50 ;
for i = 1 : 1 : 99
x(i+1) = i^2 ;
y(i+1) = multiplier * i ;
end
iv = 1:numel(x);
Lv = x <= y;
hold on
figure(1)
plot(x)
hold on
plot(y)
patch([iv(Lv) flip(iv(Lv))], [x(Lv) flip(y(Lv))], 'g')
grid on
3 commentaires
Dyuman Joshi
le 28 Sep 2023
"plot all the shaded area by stacking all the cases up in z domain."
What is the manner of stacking?
Can you give an exaple of how the output should look like?
Aditya Zade
le 28 Sep 2023
Modifié(e) : Aditya Zade
le 28 Sep 2023
Aditya Zade
le 28 Sep 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




