function does not apt for coding ?

function indices = argmin(C)
[m i] = min(C(:));
if isvector(C)
indices = i;
else
indices = ind2subv(sizePMTK(C), i);
end
...
Error in ==> trained at 1324
Function indices = argmin(C)

댓글 수: 5

Mohan
Mohan 2013년 2월 26일
could you please give some more information on your code...
Dhines
Dhines 2013년 2월 26일
my actual need is argmin(C) value. the above mentioned function i saved separate .m file. i execute its work well. but i want this function code in my main code. when this function using in my main code. its shows error. tel me ur needs?...i wil tell.
Walter Roberson
Walter Roberson 2013년 2월 26일
I think you will find that ind2subv() does not exist.
You will also find that min(C(:)) never returns multiple indices into "i".
If you already know that your input C is a vector (or matrix), then why not just use min() directly?
Jan
Jan 2013년 2월 26일
Please post the complete error message.
Dhines
Dhines 2013년 2월 26일
i made it sir. thanks for ur response.

답변 (0개)

이 질문은 마감되었습니다.

태그

질문:

2013년 2월 26일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by