how can i combine two graph which is linear and semilogy into one graph by using legend,the input is same for the linear and log graph
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jason Tan Jia Sheng
am 24 Dez. 2021
Kommentiert: Jason Tan Jia Sheng
am 24 Dez. 2021
Vg=[-2:2:10]
while A<=4
Id = Up*Cox/2*A*((Vg-Vth).^2);
f = semilogy(Vg,Id);
subplot(2,2,B),plotyy(Vg,Id,'- o k',Vg,f,'- x b');
hold on;
A=A*2;
B=B+1;
end
0 Kommentare
Akzeptierte Antwort
Chunru
am 24 Dez. 2021
x = (1:10);
y1 = rand(10,1);
y2 = 10.^(3*randn(10,1));
yyaxis left
plot(x, y1, 'ro-')
yyaxis right
semilogy(x, y2, 'b*-')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!