Contenuto principale

move

R2026b

Change the position of a row in a Safety Analysis Manager spreadsheet

Since R2026b

Description

move(spreadsheetRow,toPosition) moves the row represented by the SpreadsheetRow object, spreadsheetRow, to the index toPosition in the Safety Analysis Manager spreadsheet.

example

Examples

collapse all

Create a new spreadsheet and add three rows.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;
addRow(mySpreadsheet,Count=3)

Get the first row as a SpreadsheetRow object and move it to the third position.

myRow = getRow(mySpreadsheet,1);
move(myRow,3)

Input Arguments

collapse all

Row in the Safety Analysis Manager spreadsheet, specified as a SpreadsheetRow object.

New index for the row, specified as a positive integer. The index of the topmost row of the spreadsheet is 1.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Tips

  • To move a row using a Spreadsheet object and the index of a row, use the moveRow function.

  • To retrieve a row from a spreadsheet, use the getRow function.

Version History

Introduced in R2026b