perform polyfit on a semilogy plot
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alexander Derrico
le 23 Oct 2022
Réponse apportée : Torsten
le 23 Oct 2022
I have 2 sets of data, t_discharge and Volt_discharge. I want to plot t vs volt in a semilog graph where t is x axis and vollt is y axis with log scale. How do I plot a first order line of best fit through this graph and get slope and y-intercept? Thanks!
0 commentaires
Réponse acceptée
Torsten
le 23 Oct 2022
A = [ones(numel(t_discharge),1),t_discharge];
b = log10(Volt_discharge);
x = A\b;
semilogy(t_discharge,[Volt_discharge,10.^(x(1)+x(2)*t_discharge)])
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Objects dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
