making plot smooth not completely linear

5 views (last 30 days)
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.

Accepted Answer

David Hill
David Hill on 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 Comment
random1072
random1072 on 17 Apr 2020
THANK YOU!.. love matlab but still trying to get the hang of plotting

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!