Matlab Coding Help: Initialize Variables in Pop and Pro

  • Context: MATLAB 
  • Thread starter Thread starter yeongchuan88
  • Start date Start date
  • Tags Tags
    Coding Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 3K views
yeongchuan88
Messages
4
Reaction score
0
chromosome = initialize_variables(pop,pro);


What is the meaning of this line ?

Thank you..
 
Physics news on Phys.org
Hi
initialize_variables could be a user defined function which takes pop and pro as inputs and chromosome is the output of the function.
Type "help initialize_variables" in MATLAB command prompt to know about that function.
 
What is the difference betweenfunction f = initialize_variables(N,problem)

and

function [f] = initialize_variables(N,problem)Thank you !
 
Last edited:
yeongchuan88 said:
What is the difference between


function f = initialize_variables(N,problem)

and

function [f] = initialize_variables(N,problem)


Thank you !

No difference.
If two output variables are there (say f and g)then
function [f,g] = initialize_variables(N,problem)

For single variable it won't make difference.