Adding header - Function with two outputs and two frequencies.
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm in the progress of adding a header with function to my program. It's this: https://se.mathworks.com/help/matlab/ref/function.html#btexd6d-4
The problem is that, I've two frequencies, and I actually don't know what to do, I've tried to use two functions, but it gives me an error.
I've tried the following, but it gives me an error:
function s1 = ToneOut_1(freq1,duration,amp);
function s2 = ToneOut_2(freq2,duration,amp);
댓글 수: 0
답변 (1개)
Star Strider
2020년 10월 13일
Perhaps an anonymous function will do what you want. See the documentation section on Anonymous Functions for a description and details.
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!