Problem 2485. Initialize a varible with an integer value from a another variable which is assigned with a character value.
Initialize a varible with an integer value from a another variable which is assigned with a character value.
ex: Test = 'c'
c = 10
Aim: Result = 10
Result variable has to initialized with value 10 without assigning Result = c directly or by using other variables in script.
Solution Stats
Problem Comments
-
2 Comments
Jean-Marie Sainthillier
on 7 Aug 2014
Problem in test 3.
Dyuman Joshi
on 2 Jan 2022
Hacks, hacks everywhere
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Select every other element of a vector
35894 Solvers
-
Pythagorean perfect squares: find the square of the hypotenuse and the length of the other side
58 Solvers
-
Back to basics 25 - Valid variable names
336 Solvers
-
Vectorizing, too easy or too hard?
146 Solvers
-
Generate a random matrix A of (1,-1)
397 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!