Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Help with error running a function

1 visualización (últimos 30 días)
Lavorizia Vaughn
Lavorizia Vaughn el 30 de Sept. de 2021
Cerrada: Cris LaPierre el 30 de Sept. de 2021
i have the code for #3 of the attached document. For some reason i am getting a warning about the variable p changing size. Im also geting an error for (the code below) which says unrecognized function or variable 'findzero'.
z = findzero(f,x(k-1),x(k),tol);
my code is as follows:
function p = findz(f,a,b,n,tol)
p = [];
x = linspace(a,b,n+1);
for k = 2:length(x)
if f(x(k)) * f(x(k-1)) > 0
continue
else
z = findzero(f,x(k-1),x(k),tol);
p = [p,z];
end
end
disp(p)
end

Respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by