Hi, DP. You have created a nice problem here: well done. Could you please clarify/check/amend one detail though. In the Problem Statement it stipulates the sum must be that "less than" maxval. So if maxval=1, then the series would have no terms (hence sum=0); alternatively, if it had one term, then the sum (1²=1) would be "less than or equal to" maxval, as implied in the Test Suite. Thanks, DIV
Thanks for the clarification!
This submission has evidently been copied from 'somewhere', because it is _identical_ to Solution 1499384 (submitted on 21 Apr 2018 by J. S. Kowontan). It would be good professional practice to _at least_ acknowledge the source. Moreover I don't see the point of submitting a verbatim copy of somebody else's solution; it does not bring any credit. —DIV
Generate a vector like 1,2,2,3,3,3,4,4,4,4
07 - Common functions and indexing 6
Find out sum of all elements of given Matrix
Calculate some equation
Even or Odd
Find the treasures in MATLAB Central and discover how the community can help you!
Select a Web
Choose a web site to get translated content where available and see local events and
offers. Based on
your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country
sites are not optimized for visits from your location.
Contact your local office