Your initial code suggestion is weird :)
good!
Why it is wrong?
too easy =)
Do I get points for commenting?
easy
good
function [q,r] = swapInputs(a,b)
[q1,r1] = cart2pol(a,b);
q1=(pi/2)-q1;
[q,r]=pol2cart(q1,r1);
end
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 :)
6734 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1022 Solvers
386 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
279 Solvers
Create a vector whose elements depend on the previous element
392 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!