why this code is not correct?
s = summ(v)
>> b=s
>> s(1)=[]
>> c=[[s],0]
>> s=[b+c]
>> s(end)=[]
sorry mate, this is unfair for those who actually came up with a compact solution
No need to be sorry.
Personally I think the regexp should be always forbidden.
I used it (and I had never thought about it before) because it seems that everyone is using it.
753 Solvers
07 - Common functions and indexing 5
314 Solvers
Area of an equilateral triangle
2759 Solvers
Matlab Basics II - Extract last 3 elements of a vector
164 Solvers
Test Problem; Create a 5x5 array containing all ones
270 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!