7. Write and test a function called twice that doubles the value of its input variable (i.e. the statement x= twice(y) should double the value of y).
3 views (last 30 days)
Show older comments
help me to solve this problem can i use for loop for this problem.?
1 Comment
Guillaume
on 26 Feb 2015
Seriously? Have you even though about what the question is asking? It is such a simple function to write.
How do you manually double the value of a number? How do you write the same in matlab?
If you can't answer that question, then I'd suggest you go back to your course notes or try Getting Started
Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!