Editing Tips and tricks
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 139: | Line 139: | ||
for i=1:n, x(i) = i; end | for i=1:n, x(i) = i; end | ||
x = 1:n; | x = [1:n]; | ||
This works for expressions on the index by wrapping the index in an expression: | This works for expressions on the index by wrapping the index in an expression: |