??? Error using ==> randperm Too many input arguments.
Error in ==> InverOver at 29 Position_City1 = randperm(length(Route), 1); %zvoleni nahodneho mesta
Error in ==> Program>Start_Callback at 168 [Result, Output] = eval([Funkce{metoda} '(Coordinates, handles)']);
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> Program at 17 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)Program('Start_Callback',hObject,eventdata,guidata(hObject))

답변 (2개)

Thorsten
Thorsten 2015년 7월 9일
편집: Thorsten 2015년 7월 9일

0 개 추천

Check
whos Route
n = length(Route)
BTW, if you need just one value, you can use
randi(n, 1)
Guillaume
Guillaume 2015년 7월 9일

0 개 추천

Possibly, you're using an older version of matlab (< R2011b), before randperm acquired its second optional argument.

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

질문:

2015년 7월 9일

답변:

2015년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by