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 commentaire

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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Mathematics and Optimization dans Centre d'aide et File Exchange

Question posée :

le 26 Fév 2015

Commenté :

le 26 Fév 2015

Community Treasure Hunt

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

Start Hunting!

Translated by