I'm sure some smarter person will find a faster method!
My solution passed on the third try; there's definitely some CPU timing mismatch going on!
Agreed, some of my solutions passed only part of the time.
Hi, just wondering whether someone could help me out here. I was expanding the testset, and I was trying x = [1:10 2:11] but I got an error "Error: Dimensions of matrices being concatenated are not consistent." I then tried x = [1 2 3 4], and x = 1:4; but got the same error. On my version of MATLAB all these statements work perfectly and I believe they are basic MATLAB syntax. x = [1; 2; 3; 4] worked fine however. In the end I had to transpose the matrices.
it even cannot pass on my own computer, but....
It was too tempting...
I thought I was being original by trying this. Guess not... :-(
Clever :), hadn't thought of that!
thanks for the hint!
Renaming a field in a structure array
Project Euler: Problem 3, Largest prime factor
Back to basics 13 - Input variables
Back to basics 23 - Triangular matrix
Basics: 'Find the eigenvalues of given matrix
RISK board game battle simulation
Penny flipping - calculate winning probability (easy)
Who is the smartest MATLAB programmer?
Calculate the probability that at least two people in a group share the same birthday.
It's race time again! Write a function that is at least twice as fast as the test suite call of repmat().
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office