MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Search Solutions

255Size

0 Comments

35Size

0 Comments

82Size

0 Comments

92Size

0 Comments

120Size

0 Comments

129Size

0 Comments

136Size

0 Comments

226Size

0 Comments

59Size

0 Comments

205Size

0 Comments

150Size

0 Comments

56Size

0 Comments

285Size

0 Comments

281Size

0 Comments

307Size

0 Comments

223Size

0 Comments

67Size

0 Comments

408Size

0 Comments

98Size

0 Comments

251Size

0 Comments

515Size

0 Comments

53Size

0 Comments

252Size

0 Comments

308Size

0 Comments

308Size

0 Comments

38Size

0 Comments

1 player likes this solution

40Size

0 Comments

206Size

0 Comments

218Size

0 Comments

230Size

0 Comments

238Size

0 Comments

159Size

0 Comments

159Size

0 Comments

159Size

0 Comments

192Size

0 Comments

195Size

0 Comments

196Size

0 Comments

192Size

0 Comments

191Size

0 Comments

208Size

0 Comments

234Size

0 Comments

234Size

0 Comments

251Size

0 Comments

67Size

0 Comments

90Size

0 Comments

68Size

3 Comments

3 Comments

Jan Orwat
on 17 Sep 2014

Sorry for resubmitting an old regexp solution. Seems, that previous one disappeared. I have to solve this problem the proper way.

Paul Berglund
on 18 Sep 2014

I think that this solution is perfectly legitimate. Why try to solve it "properly"? It's not like you are using eval or something like that. regexprep is a perfectly legitimate tool to use.

Jan Orwat
on 18 Sep 2014

I agree with your point of view. Regexprep is a powerful function here.
Unfortunately I've used also '(??@some_code)'. In this case, it's not as bad as playing 'size=11' solution, but it is still a kind of size-cheating for me. I used to play solutions like that, but now I try to avoid this.

138Size

1 Comment

1 Comment

Jon
on 17 Sep 2014

At the time of submission, all better scores use either a lookup table or regexp.

169Size

0 Comments

283Size

0 Comments

281Size

0 Comments