How to stack-up multiple cases in z axis?
Mostrar comentarios más antiguos
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 comentarios
Dyuman Joshi
el 28 de Sept. de 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
el 28 de Sept. de 2023
Editada: Aditya Zade
el 28 de Sept. de 2023
Aditya Zade
el 28 de Sept. de 2023
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




