Christopher - I am not all that clear on what you mean by to void the variables w and a. Your MATLAB function signature would be near identical to that for the Java version. Just do something like
Since your Java function doesn't return anything (void) then there is nothing to declare for the MATLAB function either.
As for the for loop (which seems to be missing an integer declaration for i, perhaps the data type is inferred as integer if one is not declared)
I've used k as the index variable since i and j are representation of the imaginary number in MATLAB so it is good practice to avoid using these names for indexing variables. The syntax for the for loop is clear - k starts at zero and ends at numPoints-1. We don't need to specify the increment for k at each iteration (the default is one).
Just be wary - MATLAB arrays are one-based and the () brackets are used to access elements in an array. So if myArray is a row vector/array, then the first element is accessed with
the second with
etc., and the last can be accessed simply with
Hope that the above helps!