How to use log scale with fimplicit
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
lorenzosilvestri1998
am 18 Aug. 2022
Kommentiert: lorenzosilvestri1998
am 18 Aug. 2022
Hi everyone, I have to plot an implicit equation and I'm using fimplicit:
fimplicit(@(x,y) cosh((log(2)*(x-1))./((x+1).*y)) - (1/2)*exp(log(2)./y), [1 1000 0 1])
that's ok but I need it on log scale on the x-axis. Is it possibile to use semilogx in this case or something similar?
Thx :)
lorenzo
0 Kommentare
Akzeptierte Antwort
Torsten
am 18 Aug. 2022
Bearbeitet: Torsten
am 18 Aug. 2022
x = 0:0.1:1000;
fun = @(x,y) cosh((log(2)*(x-1))./((x+1).*y)) - (1/2)*exp(log(2)./y);
options = optimset('Display','none');
tic
y = fsolve(@(y)fun(x,y),0.5*ones(size(x)),options);
toc
tic
y = arrayfun(@(x)fsolve(@(y)fun(x,y),0.5,options),x);
toc
semilogx(x,y)
Weitere Antworten (1)
Walter Roberson
am 18 Aug. 2022
fimplicit(@(x,y) cosh((log(2)*(x-1))./((x+1).*y)) - (1/2)*exp(log(2)./y), [1 1000 0 1])
set(gca, 'XScale', 'log')
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


