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).

help me to solve this problem can i use for loop for this problem.?

1 Comment

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

Sign in to comment.

Answers (0)

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Asked:

on 26 Feb 2015

Commented:

on 26 Feb 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!