how to plot a graph in log base 10 scale on the x axis

Can anyone help with the proper syntax to plot a graph in log base 10 scale for example with f on the x -axis(log base 10 scale ) and ZB on the y -axis for this expression:
for f = [1 4 10 12 17 19 24 26 34 38];
m = 10;
Zcb = 104.5;
Zo = (1 + (0.055*(1-1i))/sqrt(f));
n = 800 ;
x = 1;
P = 800;
Z1 = 1+((m)*sin(2*pi*n*x/P));
ZB = abs(Zcb*Zo*Z1);
end

2 Commenti

What is the loop for? What values does f have? The ones you write in the first line? If so, they are never used in the calculation!
I have corrected it.A plot of ZB output versus f input

Accedi per commentare.

Risposte (1)

You need to fix your "for" loop the way I showed you in your previous question.

Categorie

Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange

Richiesto:

il 1 Ott 2013

Commentato:

il 1 Ott 2013

Community Treasure Hunt

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

Start Hunting!

Translated by