FUNCTION REFERENCE

end

Close a block, or the last index.

Close a block, or the last index.

Syntax

if ... end

Syntax

for ... end

Syntax

while ... end

Syntax

function ... end

Syntax

A(end)

Syntax

A(end+1) = value

Closes if, for, while and function blocks. Inside an index, end is the last index of that dimension. Assigning to end+1 grows the array.

Example

x = [10 20 30]; x(end+1) = 40   % x = [10 20 30 40]

Differences from MATLAB: Not checked against MATLAB yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.