Why is this graph just a normal graph and not a LOGLOG plot?

2 views (last 30 days)
h={.2 .1 .05 .025 .0125 .00625 .003125 .0015625 .00078125};
ha={.2 .1 .05 .025 .0125 .00625 .003125 .0015625 .00078125};
h1={.2 .1 .05 .025 .0125 .00625 .003125 .0015625 .00078125};
ha1={.04 .01 .0025 .000625 .00015625 .0000390625 .000009765625 .00000244140625 .00000061035156};
h2={.2 .1 .05 .025 .0125 .00625 .003125 .0015625 .00078125};
ha2={ (.2^4) (.1^4) (.05^4) (.025^4) (.0125^4) (.00625^4) (.003125^4) (.0015625^4) (.00078125^4)};
hold on;
loglog([h{:}], [ha{:}],'-b', [h1{:}], [ha1{:}], '-r', [h2{:}], [ha2{:}], '-g');

Answers (1)

Walter Roberson
Walter Roberson on 4 Apr 2013
When you use "hold on", you lock in log vs linear for your axes. Unless you have Very Good Reasons, your "hold on" should be after your loglog() call.

Community Treasure Hunt

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

Start Hunting!