Function Variable to update workspace variable
古いコメントを表示
Hi.
I have written a function which generates a series of variables (cleaned eeg s signals) which when created i want to replace the variable of the same name in the workspace. any body have any ideas which dont incorp evalin, assignin ?
thanks
回答 (1 件)
You can use both EVALIN and ASSIGNIN, but I would not recommend this; why not simply using an output argument? E.g.
eeg = ... ; % Workspace.
...
eeg = mrProper(eeg, ...) ; % Workspace -> function/local -> workspace.
with
function eeg = mrProper(eeg, ...)
eeg = ... ; % Operations for cleaning.
end
カテゴリ
ヘルプ センター および File Exchange で EEG/MEG/ECoG についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!