Your initial code suggestion is weird :)
Why it is wrong?
too easy =)
Do I get points for commenting?
function [q,r] = swapInputs(a,b)
[q1,r1] = cart2pol(a,b);
if u run above code in matlab it successfully swaps any input argument. why it is not accepting solution ?
[r, q] = deal(a,b)
This is a correct solution - alas using a function handle, not an m-file
You are brilliant when you are lazy
Omg love this solution so simple and easy really clever! Didn't think about this :)
I feel so pride that I just get the same code like this leading one!!!
I had no idea it'd be this simple.
Man! i am surprised looking at this! @Nikolai
Find all elements less than 0 or greater than 10 and replace them with NaN
Create a cell array out of a struct
Reverse the elements of an array
Number of Even Elements in Fibonacci Sequence
Function Call Counter
Nonuniform quantizer as a piecewise constant function
Eight Queens Solution Checker
Create a function handle that reverses the input arguments of another function handle
Eliminate unnecessary polygon vertices
Find the treasures in MATLAB Central and discover how the community can help you!
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