Cannot access matlab function output - variable undefined

I'm trying to plot a curve using the equation curve = (1/(sqrt(2*pi*s.^2))* exp(-((tempAnomaly-m).^2)/(2*s.^2)));. I have my program split into two functions, but when calling the calculating function from the main function, I can't seem to access the 'curve' variable even though it is the output value. I am getting the error "Undefined function or variable" on line 4 (plot(tempAnomaly, curve);).

Any tips on how to access this variable so I'm able to plot it would be great. Thanks!

function TempAnomaly()
tempAnomaly = linspace(-5, 5, 1000);
normalDist(0.4, 0.1, tempAnomaly)
plot(tempAnomaly, curve);
end

function curve = normalDist(m, s, tempAnomaly)
curve = (1/(sqrt(2*pi*s.^2))* exp(-((tempAnomaly-m).^2)/(2*s.^2)));
end


ANSWERS:


Output of normalDist should be equal to curve in line 4. So curve is undefined in line 4

function TempAnomaly()
    tempAnomaly = linspace(-5, 5, 1000);
    curve = normalDist(0.4, 0.1, tempAnomaly) %%% <- correct this line
    plot(tempAnomaly, curve);
end


 MORE:


 ? Undefined variable: url in PHP
 ? NoMethodError in OrderController#new
 ? Object with key assigned to a function returning undefined but console.log shows the data
 ? jQuery Array Undefined Error
 ? Undefined index: transfer_encoding
 ? PHP undefined offset in array looping
 ? Missing element in the function
 ? Ionic 2: Use cordova plugin with Typescript that has its own namespace
 ? Why is my variable undefined
 ? Difference between [undefined × 2] and [undefined, undefined] in JavaScript