Problem 149. Is my wife right?
Solution Stats
Problem Comments
-
68 Comments
hhhhhhh nice one
Shouldn't one of the validations ask whether she is in the room?
:)
nice
Put your wife in matlab variable. and take 1000 derivative of your wife. Result will tell you. hahha
Nice, Important thing is to get the size right!
The question says 'regardless of input', which I take to mean that more than one input is allowed. I think this should be added to the list of tests:
U = cell(1); R = struct; wiferight(@who,'do you think',U,R,'God?')
Is this a trick question?
Good problem, but I doubt its meaning.
After twenty years of marriage I easily figured this one out! 8-)
Funny
lol :)
lol:P
Is my girlfriend right?
This is hilarious lol
HaHa!
yes
I have a doubtt when I try to write this code using anonymous function i.e., wiferight=@(in)'out' and cecked the output in MATLAB 2007b version it gave me the correct answer why is it giving a wrong answer I am unable to understand it.
Sneha, do you really want to tell your wife to get 'out'?
"Who's the boss?"
"Yes"
:)
Hahaha yes!
Can I use quantum entanglement?
Here's a ThingSpeak answer using ThingSpeak's MATLAB Visualization app: https://thingspeak.com/channels/97907
Hahaha!
SORRY! I meant, "YES!"
basic
Good task)
This is a good problem!
Haha
Gets a good laugh
Genious!)
Wah. -claps hand-
this is so funny
1st try :)
very deep
nice
lol
nice
lol
Yes they are....
nice
hhhhhh! But guys, do you have a wife? :(
fun problem
Accurate.
delete this garbage
I seem to be caught in an infinite loop.
This is an easy problem
this function just result in an error "No need to even ask the question"
:P
I just typed yes, my solution size is 10, still longer than the leading solution. I think your wife is wrong! hahaha :D
nooooo way!
that's the first truth of life!
Yes
great :)
She is always right. Lol.
lol this is very funny ahaha
Just to earn the commenter badge :p
lol
very fun here's for commenter badge
Lol
funny + easy problem
This one made me laugh
.
Lol
XDD
Quality problem
good. problem good. yes
can you help my code please.
Solution Comments
-
3 Comments
Nice
It was a tough struggle to write this code
Noice
-
1 Comment
good solution
-
1 Comment
what is meaning of this problem?
-
1 Comment
Very funny :-)
-
1 Comment
Yes Lol
-
1 Comment
Even monkey can solve this problem loll
-
1 Comment
yes
-
2 Comments
Uhmm, what was that?
This is the best problem ever (y)
-
1 Comment
This is a very silly question. Doesn't specify any skill check.
-
1 Comment
hhhhhhhhhhhhhhhhhhhh
-
1 Comment
a='yes';
-
1 Comment
This is a bit of a Mickey Mouse problem!
-
1 Comment
Do you want a wife or not?
-
1 Comment
"Is the wife right?"
Well definitely, 'yes'.
-
1 Comment
very easy
-
2 Comments
What!!!
Very funny.
-
1 Comment
too simple
-
1 Comment
Haha. What you've said is reasonable. I'm convinced.
-
1 Comment
nice
-
1 Comment
This is great!
-
1 Comment
yes indeed
-
1 Comment
.
-
1 Comment
women always right! :D hahahhahahah
-
1 Comment
good
-
1 Comment
EZ
-
1 Comment
This user appears to have gamed the system, with fraudulent "likes" of this unremarkable solution submitted by 'sock-puppet' accounts. —DIV
-
2 Comments
how to find or how to determine "Size " for any solution ?????
https://www.mathworks.com/matlabcentral/fileexchange/34754-calculate-size
-
2 Comments
excellent
Great!
-
3 Comments
Test are ok on my computer with MatlabR2014a.
Why is it failed online ?
haha...I laugh....
Isn't it suppose to be a function? Atleast 16a MATLAB thinks your code is a script not a function
-
4 Comments
How can this solution code have a size of 8? It's ONE LINE!
There is a nifty trick for reducing what seems like the shortest possible solution. I don't really want to just state the trick, as it is fun to learn or discover on your own.
If you can't figure it out, I suggest that you submit a simple problem to Cody, and look at the solutions. (They will all be viewable to you, as the problem submitter.) Someone will use the trick, almost certainly.
So does this trick work in the actual application as well, or is it related to how Cody calculates the code size?
I mean will this "trick" actually improve the performance in Matlab env?
No, the trick is actually fairly poor coding practice
-
1 Comment
oooh yes
-
1 Comment
sorry i wrote that just to be able to see the solution
-
1 Comment
So wise.
-
1 Comment
How is the size of any code reduced ??
-
2 Comments
Can somebody explain the assert function? I have never used it.
http://www.mathworks.com/help/matlab/ref/assert.html
-
3 Comments
It seems you just have to be gentle about it ;)
This is a good one!
entertaining question!!
-
2 Comments
-
1 Comment
The test suite is just amazing.....
-
1 Comment
Awesome code!!!!1
-
1 Comment
I LOVE the tests :)
-
5 Comments
:)
Creative
Accurate :)
hahahaha cool
good
Problem Recent Solvers16599
Suggested Problems
-
Project Euler: Problem 7, Nth prime
1129 Solvers
-
Who knows the last digit of pi?
623 Solvers
-
Return elements unique to either input
733 Solvers
-
Matlab Basics II - Count rows in a matrix
341 Solvers
-
771 Solvers
More from this Author23
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!