MATLAB: Program that displays the first 20 even numbers beginning with 100

even numbers beginning 100

I understand the function, but am having trouble reaching the output of the function using MatLab. Here's what I have so far…
function [results] = Even_Closed_Interval (num,numEven)
% Even Number Counter
% Author: OGK
% 09 March 2012
% Counts next 20 even numbers beginning with 100
num = 100;
count = 0;
numEven = 0;
a = mod (x,y)
while count < 20;
if mod == 0;
disp (num)
count = count+1;
end
num = num+1;
end
Am I on the right track? Please respond ASAP if anyone can help me.
OngoingKestrel
MATLAB User

Best Answer

I think this would be more on the right track
count = 20;
startingValue = 100;
out = startingValue : 2 : startingValue +2*count-1