Problem 1. Times 2 - START HERE
Why does y = bitshift(x,1); give a larger solution size than the most common answer listed so far?
The first problem. Very easy but enough to start the Cody Game. Great game!
I guess it`s because calling bitshift makes the code size bigger. You call a function.
When there is only x*2 its 1 operation only.
Deceivingly easy start to the game!
Ha ha I got it
I did in fact start here.
Good problem for beginners.
I tried to use bitshift but I forgot it doesn't work with x<0
Easy starter problem. Except I was expecting Cody, to require a '.m' file upload.
very basic,very interesting indeed
good for newcomers
1st try :)
This is the best way to start using Cody
This is the best problem to start using Cody.
Instructions say to press the "Solve This Now!" button, but there is no such button...
I submitted the following, which works in my version of matlab, but it found errors and said it wasn't valid:
function y = times2(x)
% Modify the line below so that the output y is twice the incoming value x
y = bitsll(x,fi(1));
% After you fix the code, press the "Submit" button, and you're on your way.
The beginning of the dream!
this is nice..
What is the meaning of these axises
No one can solve this.
Hardest problem ever.
a new starting
Nice problem for beginners
Great for test, like Hello world.
Search for multiplication techniques on MATLAB if you can't get the answer.
almost stumped me
We can do it
Why was a function statement needed here?
The problem is simple enough but I am afraid you are losing others interest by putting a function inside the code.
A simpler code would provide the same context, but with less confusion why a function statement is given.
too much fun
The solution size just doesn't make sense. We need a new metric.
best problem I've ever met
Easy one 😁
Very simple problem.
this was nice way to learn how to use cody
Moderately difficult questions
Good basic question
Reminded me of scalar multiplication in MATLAB thanks
Solid intro to Cody.
Good starting problem!
Good for starting. Anyway, it took me some time to figure out what to do.
Quite decent for entry
Good problem to start!
Really easy start to Cody challenge
Nice Easy start
amazing problem to do
Nice starting problem
Solution CommentsShow comments
Problem Recent Solvers84400
Find state names that end with the letter A
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!