In MATLAB, how can I conveniently supply many arguments to a function?

Rewrite your function to accept both conventions.

Rewrite your function to accept both conventions: function = myfun(v1,v2,v3,v4,v5,v6) if nargin==1 v2 = v1(:,2); v3 = v1(:,3); v4 = v1(:,4); v5 = v1(:,5); v6 = v1(:,6); v1 = v1(:,1); end %# use v1,v2,v3,v4,v5,v6 %# ... end Now you can call as both: myfun(A(:,1),A(:,2),A(:,3),A(:,4),A(:,5),A(:,6)) myfun(A) Usually you would do more validation to test for the correct number of arguments...

You can first place each column of A in a cell of a cell array using the function NUM2CELL, then pass the cell array contents as a comma-separated list using the {:} syntax: B = num2cell(A,1); myfun(B{:}).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions