Azzera filtri
Azzera filtri

I wanna do the plot exactly the same as the attached picture, my Y axis should start from 0.0001. and i need to draw this red dashed line from the end of plot point to x axis

1 visualizzazione (ultimi 30 giorni)
clear all;
load 'Theta_x.txt'; %correction factor 1-4
X=Theta_x;
load 'POE_Y.txt'; %probability of exceedance of the factor HEC-18 scour
Y=POE_Y;
semilogy(X,Y);
title('Correction Factor And Probability of Exceedance');
xlabel('Correction Factor Θz');
ylabel('Probability of Exceedance PoE');
Theta_x = readmatrix('Theta_x.txt');
POE_Y = readmatrix('POE_Y.txt');
X=Theta_x;
Y=POE_Y;
plot(X,Y)
grid
set(gca, 'YScale','log')
title('Correction Factor And Probability of Exceedance');
xlabel('Correction Factor Θz');
ylabel('Probability of Exceedance PoE');

Risposta accettata

Voss
Voss il 29 Lug 2022
How about this?
Theta_x = readmatrix('Theta_x.txt');
POE_Y = readmatrix('POE_Y.txt');
plot(Theta_x,POE_Y)
hold on
plot([max(Theta_x) 3],[min(POE_Y) 1e-4],'--r')
grid
set(gca, 'YScale','log')
title('Correction Factor And Probability of Exceedance');
xlabel('Correction Factor Θz');
ylabel('Probability of Exceedance PoE');
xlim([0 4])
ylim([1e-4 1])
  8 Commenti
Khaled aL Qattawi
Khaled aL Qattawi il 30 Lug 2022
thanks, but i have another question, in the top we used straight line or linear process to forcast the rest of the curve, but some times this doesn't work correctly. please the attached picture for different set of data show something doesn't fit good, is there other comand this this type of fit curves.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by