Hello, Durga Sadasivuni. Please explain clearly in the Problem Statement what the input (x) represents, and what the output (y) represents. For extra assistance in understanding the problem, you can also provide an example in the Problem Statement. —DIV
Two more issues: (1) You need to decide what value you would like people to use for the speed of light. Depending on the value, you may get non-integer results in the correct output, as per Solution 1559564. If you don't want people to use the exact value, then you must say so [if there is no instruction about the value, then use of the exact value would be implied]. (2) You need to decide what precision you would like the output to be provided in; currently there seem to be rounding errors in your last two test cases [if I understand the problem & your assumptions correctly], as per Solution 1559559. —DIV
Make the vector [1 2 3 4 5 6 7 8 9 10]
Reverse the vector
Area of rhombus
Reshape a Vector
sum all digits
Find the treasures in MATLAB Central and discover how the community can help you!
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