이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
Would you like to be able to specify a piecewise
function? For example, piecewise_eval can do this:
x < -5, y = 2
-5 <= x < 0, y = sin(x)
0 <= x < 2, y = x.^2
2 <= x < 3, y = 6
3 <= x, y = inf
y = piecewise_eval(-10:10,[-5 0 2 3], ...
{2,'sin(x)','x.^2',6,inf})
Plot a top hat function with ezplot?
ezplot(@(x) piecewise_eval(x,[0 1],{0 1 0}),[-1 2])
인용 양식
John D'Errico (2026). Piecewise functions (https://kr.mathworks.com/matlabcentral/fileexchange/9394-piecewise-functions), MATLAB Central File Exchange. 검색 날짜: .
도움
도움 준 파일: Piecewise defined function builder
| 버전 | 퍼블리시됨 | 릴리스 정보 | Action |
|---|---|---|---|
| 1.0.0.0 | Fixed it so it now should work on older releases, as long as you supply inline functions. |
