From 03e54a77f46748cbbbd6d50eb59cd6db50862b19 Mon Sep 17 00:00:00 2001 From: Yukti Khosla <44090430+Yukti-09@users.noreply.github.com> Date: Sun, 23 Aug 2020 12:45:33 +0530 Subject: [PATCH] Create Threshold(without inbuilt).m --- .../Activation Functions/Threshold(without inbuilt).m | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 algorithms/machine_learning/Activation Functions/Threshold(without inbuilt).m diff --git a/algorithms/machine_learning/Activation Functions/Threshold(without inbuilt).m b/algorithms/machine_learning/Activation Functions/Threshold(without inbuilt).m new file mode 100644 index 0000000..2c4703d --- /dev/null +++ b/algorithms/machine_learning/Activation Functions/Threshold(without inbuilt).m @@ -0,0 +1,8 @@ +%Threshold function without using inbuilt func +x = -10:0.01:10; +y = zeros(size(x)); +y(x>=0)=1; +plot(x,y); +xlabel('x'); +ylabel('y'); +grid on