A matlab question, can anybody help please
Favorites|Homepage
Subscriptions | sitemap
HOME > Engineering > A matlab question, can anybody help please

A matlab question, can anybody help please

[From: ] [author: ] [Date: 11-10-06] [Hit: ]
Not very hard, is it?I suggest you see http://matrixlab-examples.com/matlab-com…http://matrixlab-examples.com/vectors........
Write a MATLAB function that accepts two integer (i.e., whole) numbers as input, and returns
the sum of all the integers in between, including the two input variables.

I just don't get the concept of the question. Help is appreciated! :)

-
If your first integer is 3 and your second one is 6, your script has to return the result of 3 + 4 + 5 + 6
Not very hard, is it?

a = input('Give me an integer: ');
b = input('Give me another integer: ');
sum(a : b)

I suggest you see
http://matrixlab-examples.com/matlab-com…
http://matrixlab-examples.com/vectors.ht…
.

-
x equals 0
for (x up to integer)
x
1
keywords: help,please,matlab,anybody,can,question,A matlab question, can anybody help please
New
Hot
© 2008-2010 http://www.science-mathematics.com . Program by zplan cms. Theme by wukong .