How to stack-up multiple cases in z axis?
Mostra commenti meno recenti
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 Commenti
Dyuman Joshi
il 28 Set 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
il 28 Set 2023
Modificato: Aditya Zade
il 28 Set 2023
Aditya Zade
il 28 Set 2023
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Graphics Object Properties in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




