Filled region between three functions
Afficher commentaires plus anciens
I would like to shade the region inbetween [sigma1, Friction], [sigma1, Friction2] and [sigma2, Tension_failure]. I have shaded the area between the two first functions but I don'tknow how to restrict the curve to the third function.
Forhold = 1/2 ;
Forhold2 = 54/228;
f_vk0 = 0.4 ; % Klæbningsbidrag [MPa]
mu_k = 0.65 ; % Friktionskoefficient
f_bt = 1.00 ; % Trækstyrke af sten [MPa]
f_k = 10.00 ; % Trykstyrke af sten [MPa]
sigma1 = -0.0:0.1:1.4 ;
sigma2 = 0.1:0.1:10 ;
sigma3 = 8.5:0.1:10 ;
sigma23 = 9.2:0.1:10 ;
Friction = (f_vk0 + mu_k * sigma1) / (1 + mu_k * 2 * Forhold) ;
Tension_failure = f_bt / 2.3 * sqrt(1 + sigma2/f_bt) ;
Compression_failure = (f_k - sigma3) * 1/Forhold*(1/2) ;
Friction2 = (f_vk0 + mu_k * sigma1) / (1 + mu_k * 2 * Forhold2) ;
Tension_failure = f_bt / 2.3 * sqrt(1 + sigma2/f_bt) ;
Compression_failure2 = (f_k - sigma23) * 1/Forhold2*(1/2) ;
figure()
hold on
plot(sigma1, Friction,'--','Color',[0.4660 0.6740 0.1880])
plot(sigma2, Tension_failure,'--','Color',[0.9290 0.6940 0.1250])
plot(sigma3, Compression_failure,'--','Color',[0.4940 0.1840 0.5560])
plot(sigma1, Friction2)
plot(sigma2, Tension_failure,'Color',[0.6350 0.0780 0.1840])
plot(sigma23, Compression_failure2,'Color',[0.8500 0.3250 0.0980])
% Shade the area between [sigma1, Friction] and [sigma1, Friction2]
fill([sigma1, fliplr(sigma1)], [Friction, fliplr(Friction2)], [0.7 0.7 0.7], 'EdgeColor', 'none');
grid on;

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Encryption / Cryptography 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!
