Can't find sat() function
56 views (last 30 days)
Show older comments
Hi, I want to use sat function (which is a saturation function) but I not sure which toolbox contains this function. Can anyone help? :) Urgent question!!!
Answers (1)
John D'Errico
on 17 Dec 2021
which sat -all
sat.m is not found in any MathWorks provided toolbox.
You may need to ask your instructor, since they may have written this code. Another possibility is that function may be found on the file exchange. So I looked there. (You could have done as easily!)
When I did so, after a looking at dozens of tools, I found this:
which does have a function named sat.m
function y=sat(x);
% sat is the saturation function with unit limits and unit slope.
if x>1
y=1;
elseif x<-1
y=-1;
else
y=x;
end
which does something with a saturation. Is that what you want? God only knows. :) well, you may know. Anyway, that function sat is actually pretty simple.
1 Comment
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!