Filter löschen
Filter löschen

making plot smooth not completely linear

2 Ansichten (letzte 30 Tage)
random1072
random1072 am 17 Apr. 2020
Kommentiert: random1072 am 17 Apr. 2020
trying to get my three plots to be smooth and rounded as two are exponential grow graphs and one is a quadratic graph. please help. The y components are my matrix k_tilde. attatched is my code and images of what i currently have.

Akzeptierte Antwort

David Hill
David Hill am 17 Apr. 2020
You could just overlay the respective curve-fit to your plot.
K_tilde_linear = M^(-1/2).*K.*M^(-1/2);
f=fit((1:14)',diag(K_tilde_linear),'poly1');
figure;
plot(f,(1:14)',diag(K_tilde_linear));
K_tilde_quad = M^(-1/2).*K_quadratic.*M^(-1/2);
f=fit((1:14)',diag(K_tilde_quad),'poly2');
figure;
plot(f,(1:14)',diag(K_tilde_quad));
K_tilde_expo_5 = M^(-1/2).*K_expo_5.*M^(-1/2);
f = fit((1:14)',diag(K_tilde_expo_5),'exp2');
figure;
plot(f,(1:14)',diag(K_tilde_expo_5));
K_tilde_expo_10 = M^(-1/2).*K_expo_10.*M^(-1/2)
f = fit((1:14)',diag(K_tilde_expo_10),'exp2');
figure;
plot(f,(1:14)',diag(K_tilde_expo_10));
  1 Kommentar
random1072
random1072 am 17 Apr. 2020
THANK YOU!.. love matlab but still trying to get the hang of plotting

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots 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!

Translated by