foor loop add function values to an empty vector

조회 수: 1 (최근 30일)
Mathias Pettersen
Mathias Pettersen 2019년 9월 23일
답변: madhan ravi 2019년 9월 23일
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

답변 (1개)

madhan ravi
madhan ravi 2019년 9월 23일
How to use for loop to store values MATLAB ? [Google search]

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by