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개)

Cedric
Cedric 2013년 4월 7일
편집: Cedric 2013년 4월 7일

0 개 추천

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에 대해 자세히 알아보기

질문:

2013년 4월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by