Problem 42637. Singleton Expansion without BSXFUN
BSXFUN is very useful and fast.
In R2015b we can implement singleton expansion without BSXFUN, see the test suite for details. Have fun :-)
Input and Output:
yf = yourFcn(1) % Output a function handle supported singleton expansion.
yf = yourFcn(0) % Output a function handle unsupported singleton expansion.
Solution Stats
Problem Comments
-
3 Comments
Muthu Annamalai
on 29 Sep 2015
Could you please explain what you mean by a singleton expansion ? A Wikipedia link or similar could be useful.
LY Cao
on 29 Sep 2015
Hi Muthu Annamalai,thanks for your attention to this problem.Singleton expansion was described here:
http://www.mathworks.com/help/matlab/ref/bsxfun.html
Dyuman Joshi
on 5 Feb 2023
Submitted solutions no longer work.
@LY Cao, please check the problem and update it accordingly.
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
6660 Solvers
-
Sum all integers from 1 to 2^n
15327 Solvers
-
272 Solvers
-
Return a list sorted by number of consecutive occurrences
361 Solvers
-
83 Solvers
More from this Author8
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!