Problem 542. Vectorizing, too easy or too hard?

Solution 382379

Submitted on 9 Jan 2014 by Marcel
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% assert(isequal(vect('x*x'),'x.*x'))

x = x.*x

2   Pass
%% assert(isequal(vect('x^y'),'x.^y'))

x = x.^y

3   Pass
%% assert(isequal(vect('x/z'),'x./z'))

x = x./z

4   Pass
%% assert(isequal(vect('(x*y)/z^w'),'(x.*y)./z.^w'))

x = (x.*y)./z.^w

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!