MATLAB Answers

0

foor loop add function values to an empty vector

Asked by Mathias Pettersen on 23 Sep 2019
Latest activity Answered by madhan ravi
on 23 Sep 2019
Hey, I need help to make a foor loop that adds function values one by one in an empty vector.
The function is f and I need to calculate each value for f from x inside this empty vector y.
x = linspace(-3,3,1000);
f = (1/sqrt(2*pi)) * exp(-(x.^2)/2);
y = zeros(size(f))
for i = 1:size(f)
end

  0 Comments

Sign in to comment.

1 Answer

Answer by madhan ravi
on 23 Sep 2019

How to use for loop to store values MATLAB ? [Google search]

  0 Comments

Sign in to comment.