v = [1, 2, 3, 4, 5];p = 2;w = v.^p; disp(v);disp(w);
Standard input is empty
1 2 3 4 5 1 4 9 16 25
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!