Bonjour,
Je souhaite avoir une échelle log sur l'axe des des abscisses de mon graph, mais rien à faire, je n'y arrive pas ... pouvez-vous m'aider ?
Voilà le code en question :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 close all; clear all; clc w= 0:10^5; C=100*10^-9; R1=33*10^3; R2=3.3*10^3; w2=1/(R1*C); imax=5; figure hold all for i=0:imax RV=(50/imax)*i*10^3 w1=(R1+R2+RV)./(C*R1*(R2+RV)) H0=(R2+R1+RV)./(R2+RV) H=H0*(1+1i*w/w1)./(1+1i*w/w2) semilogx(w, 20*log10(abs(H))) leg{i+1} = ['R = ' num2str(RV) ' ohm']; end hold off legend(leg) figure hold all for i=0:imax RV=(50/imax)*i*10^3 w1=(R1+R2+RV)./(C*R1*(R2+RV)) H0=(R2+R1+RV)./(R2+RV) H=H0*(1+1i*w/w1)./(1+1i*w/w2) semilogx(w, atan(w/w1)-atan(w/w2)) leg{i+1} = ['R = ' num2str(RV) ' ohm']; end hold off legend(leg) stop
Partager