passing struct to a function

Dear all
I've got a function: function [] = prt_permutation(PRT, n_perm, modelid, path, flag)
PRT is a struct
>> prt_permutation struct ('PRT') 1 'J:\Projects_2\Project_NVPFM\manuscript\results\MVPA\4mm\FABQ_total\' 1
doens't work. How I can pass the struct PRT to the function ?
many thanks! mike

 Accepted Answer

The single quotes create your ‘PRT’ structure as a character array: 'PRT'.
As best I can determine, this would be the way I would call your function:
prt_permutation(PRT, 1, 'J:\Projects_2\Project_NVPFM\manuscript\results\MVPA\4mm\FABQ_total\', 1)
Note the commas between the arguments.

More Answers (1)

Categories

Community Treasure Hunt

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

Start Hunting!