log bolting in y and x cordinates
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
i have this equation adn i want to plot it respect to w which change from 0 to 1200
xss= abs((287*w^2*(w^2*(5*i) + w - 88000*i))/(50*(w^4*(2500*i) + 1000*w^3 + w^2*(-54000099*i) - 9905000*w + 162800000000*i)) - (w^2*(w*i + 880000)*287*i)/(500*(2500*w^4 + w^3*(-1000*i) - 54000099*w^2 + w*(9905000*i) + 162800000000)))
i want the y axis to be f in log and w in x-axsis normal scale it shouls looks like this
0 Kommentare
Antworten (1)
David Wilson
am 8 Apr. 2019
You have a pretty ugly equation there, and you haven't made it easy for yourself by writing the thing un-vectorised in one long line. You also could have written "88000*i" as simply "88000i" without the * symbol. This ensures that you don't overwrite i as say an index.
Below I've vectorised it, and plotted it, and get something similar, but not exactly what you've indicated is the solution.
w = linspace(0,1200)';
i = sqrt(-1);
xss= abs((287*w.^2.*(w.^2*(5i) + w - 88000i))./(50*(w.^4*(2500i) + ...
1000*w.^3 + w.^2*(-54000099i) - 9905000*w + 162800000000i)) - ...
(w.^2.*(w*i + 880000)*287i)./(500*(2500*w.^4 + w.^3*(-1000i) - 54000099*w.^2 + ...
w*(9905000i) + 162800000000)));
semilogy(w,xss)
xlabel('\omega (rad/s)')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Axis Labels 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!