ca someone please help me with this . i get not enough input argument.

function boohoo = f(y, A)
boohoo = 0;
for i = 1:500,
boohoo= log(1-y(i)^2)-log(1-A(i,:)*y) +boohoo;
end

Respuestas (1)

Thorsten
Thorsten el 23 de Oct. de 2015
Editada: Thorsten el 23 de Oct. de 2015
You have to call the function with two arguments.
y = rand(500,1);
A = rand(500, 500);
f(y, A);
Note that it would be more robust if you use
for i=1:numel(y)
and
assert(size(y,1) == size(A, 2))
before the loop.

La pregunta está cerrada.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 23 de Oct. de 2015

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by