I'm new to Mathematica and I'm wondering is there a way to wrap up a code segment. For examle, when i write a MatLab i can wrap a hole sequence. MatLab syntax:
function [rtn args] = MyFunction(inpt args)
//Do your code here.
In addition, it make sense to separate a function into a different file so your main procedure wont be messy.
As i'm googling my way around Mathematica i could only find examples for a single-line-logic function.
My main interest is DSP. Lets say i have my code snippet for impementing a digital filter. it takes i't arguments and returns the filter's coff.. the snipped is about 100 rows of code. I would like to wrap it and store it away from my main procedure so i can call execute it with a single line. Just like any other builtin function. To summerize, i'd like to solve two issues.
1. How do i create a multy-line function
2. How can i wrap a function to single file, and use it from my main nb.