Borrar filtros
Borrar filtros

Matlab starts debugging, I do not know why.

3 visualizaciones (últimos 30 días)
Ole
Ole el 29 de Mayo de 2013
Hi
I am trying to make an easy code where I will plot how to different function series act for an increasing number of parts, for different x-values. But matlab just starts the debugging mode, do you see whats wrong?:
x1 = [-1:0.01:1];
x2 = [-1:0.01:3];
all = [10,100,10000];
for N = all
s1 = 0;
s2 = 0;
for i = 0:N
s1 = s1 + x1.*(1-x1.^2).^i;
s2 = s2 + (x2-1).^i/sqrt(i+1)/2^i;
end
figure(1);
hold on
plot(x1,s1);
figure(2)
hold on
plot(x2,s2)
end
%
% figure(1)
% legend(num2str(all(1)),num2str(all(2)),num2str(all(3)))
% figure(2)
% legend(num2str(all(1)),num2str(all(2)),num2str(all(3)))
  1 comentario
Walter Roberson
Walter Roberson el 29 de Mayo de 2013
Does it display an error message as it starts the debugging ?
Does the command
dbstatus
show anything?

Iniciar sesión para comentar.

Respuestas (2)

Ilham Hardy
Ilham Hardy el 29 de Mayo de 2013
Hi,
all is one of the internal command in matlab.
Rename your all parameter to another name, and see if that helps..

Image Analyst
Image Analyst el 29 de Mayo de 2013
How did you start running the script: by clicking the green triangle, by typing F5, or by typing F10?

Categorías

Más información sobre Graphics Objects 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