필터 지우기
필터 지우기

assign variable name to Function Output Variables

조회 수: 3 (최근 30일)
Adrian
Adrian 2019년 11월 8일
댓글: Guillaume 2019년 11월 8일
Hi All
when using a Function it is possible to assign a variable name to the input
e.g
wave = Uph
[.........] = waveform(wave)
Is it possible to use the same variable in the output definition
[wave_rms]=waveform(wave)
so the output variable stored in the workspace is Uph_rms and not wave_rms?
Thanks
Adrian

답변 (1개)

M
M 2019년 11월 8일
Why don't you just change [wave_rms]=waveform(wave) into [Uph_rms]=waveform(wave) ?
  댓글 수: 5
Adrian
Adrian 2019년 11월 8일
They are 20 different variables
Guillaume
Guillaume 2019년 11월 8일
They are 20 different variables
That's where you went wrong and what we have to fix. How were these 20 different variables created in the first place.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by