Borrar filtros
Borrar filtros

How can i construct semilog plot

1 visualización (últimos 30 días)
Zuy
Zuy el 29 de Oct. de 2018
I want to make a plot error vs N. N sould be in x axis (4,6,8,10,12,14,16). and y exis should be log scale to represent error values. But my code is wrong. How can i do that?
syms j
N=4:2:16;
for i=1:length(N)
S(i)=(2*pi/(N(i)+1))*(symsum(cos((20*pi*j)/(N(i)+1)),j,0,N(i)));
A(i)=double(S(i)) ;
end
syms x
f=cos(10*x);
in=double(int(f,[0 2*pi]));
err=A-in;
semilogy(err,N);

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by