How to create a separate function file for a piecewise function?
Show older comments
How do I create a function with the function:
f(x) = -ax+b for 0<x<b/a and f(x)=0 for x>b/a?
I want it in a seprate file.
How do I then use it in my main code? (call it)
1 Comment
Stephen23
on 31 Mar 2022
What should be the value for x<=0 ?
Accepted Answer
More Answers (0)
Categories
Find more on Bessel functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!