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

 采纳的回答

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.

更多回答(1 个)

类别

帮助中心File Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by