Dear John,
should that matrix have as many columns and files as parameters?
How could I set a direction in which to begin searching when just a
single parameter should be optimized?
Thanks again
Carles
John Ashburner <[log in to unmask]> ha escrit:
> What arguments are you calling spm_powell with? The second parameter
> needs to be a matrix, which may be confusing. See around line 121 of
> spm_coreg.m for an example.
>
> All the best,
> -John
>
> Dear spmers,
>
> I am trying to run spm_powell function to perform a minimization
> of a function depending on a single parameter 'a' and I am
> getting the following error message:
>
> ??? Index exceeds matrix dimensions.
>
> Error in ==> spm_powell>search at 172
> t = t(ind);
>
> Error in ==> spm_powell>min1d at 65
> [f,pmin] = search(t,tol);
>
> Error in ==> spm_powell at 36
> [p,junk,f] = min1d(p,xi(:,i),func,f,tolsc,varargin{:});
>
> Error in ==> nor_intensitat at 41
> param=spm_powell(a,1,0.001,@f_correlacio,G3,F3);
>
> where a is the variable to minimize and f_correlacio the
> function to be minimized which depend in a, G3 and F3
>
> Is it correct to use spm_powell in this way? If yes, any clue
> about which could be the problem?
>
> Many thanks
>
> Carles
> --
> John Ashburner <[log in to unmask]>
>
>
|