Generated reference › Command glossary — console commands, verbs, functions
kind: generated#commands#catalog#console#glossary

Command glossary — console commands, verbs, functions

Everything the console understands: 62 registered commands, 132 matrix functions and 74 recipe verbs. ICoreCommandGlossary is the one catalog the app itself builds from these three sources — it feeds the glossary command, Tab completion and the suggestion popup.

Run one headlessly: ICoreBlocks --console "<command line>" — a bare --console with no command hangs forever, so always pass the command. The binary is the app bundle, not the loose build-mac/ICoreBlocks.

Commands#

CommandWhat it doesRegistered in
clearClear the current output log (same as cls)ICoreCommandSamples.cpp
clearAllClear all logs, the variables space, and recipe handlesICoreCommandSamples.cpp
clearAllLogsClear all output logsICoreCommandSamples.cpp
clearCommandHistoryForget every command line recalled by the Up arrow, in this session and previous onesICoreCommandHistoryStore.cpp
clearRecipeHandlesClear all recipe handle bindingsICoreCommandSamples.cpp
clearVariablesSpaceClear all variables from the variables spaceICoreCommandSamples.cpp
clsClear the current output logICoreCommandSamples.cpp
commandParityPrepareICoreCommandParityCommands.cpp
diagramExportVerifyICoreParityDiagramCommands.cpp
diagramPrepareICoreParityDiagramCommands.cpp
docsSampleICoreDocsSampleCommands.cpp
echoPrint the arguments backICoreCommandSamples.cpp
exportVerifyICoreParityCommands.cpp
generateRecipePrint a recipe script reproducing a subsystem's block diagram (default: Home)ICoreCommandSamples.cpp
getModelConfigPrint one simulation/solver setting: getModelConfig <property>ICoreModelConfigCommands.cpp
getNameICoreModelConfiguratorCommands.cpp
getNameICoreModelConfiguratorCommands.cpp
getNameICoreModelConfiguratorCommands.cpp
getSlowPaceStepDelayGet the slow-pace step delay in millisecondsICoreModelConfiguratorCommands.cpp
gitCommitStage everything and commit: gitCommit <message> (saves the diagram to .iproj first)ICoreGitCommands.cpp
gitFetchFetch every remote without mergingICoreGitCommands.cpp
gitInitInitialize a git repository in the active project folderICoreGitCommands.cpp
gitLogShow the last N commits (default 30): gitLog [count]ICoreGitCommands.cpp
gitPullPull from origin; reloads the project from disk if new commits arrivedICoreGitCommands.cpp
gitPushPush HEAD to origin, setting upstream if neededICoreGitCommands.cpp
gitRemotePrint origin's URLICoreGitCommands.cpp
gitRootPrint the repository root, or fail if the project folder is not a repositoryICoreGitCommands.cpp
gitSetRemoteSet origin's URL, or remove origin when called with no URL: gitSetRemote [url]ICoreGitCommands.cpp
gitStatusShow the working-tree status (porcelain, with branch/upstream)ICoreGitCommands.cpp
glossaryList all commands, matrix functions, and syntaxICoreCommandSamples.cpp
guiBlessICoreGuiRegressionCommands.cpp
guiListICoreGuiRegressionCommands.cpp
guiTestICoreGuiRegressionCommands.cpp
helpList all registered commandsICoreCommandEngine.cpp
listNameICoreModelConfiguratorCommands.cpp
matlabExportScriptICoreMatlabCommandBridge.cpp
modelConfigPrint every simulation/solver setting and its current valueICoreModelConfigCommands.cpp
nameICoreCommandEngine.cpp
navigationRootAccessPrint whether the tree above Home (Root / Temp / ClipBoard / Trash) is reachableICoreNavigationCommands.cpp
openTemplateOpen any template as a new project: openTemplate <id> [name]ICoreTemplateCommands.cpp
parityExportICoreParityCommands.cpp
parityPrepareICoreParityCommands.cpp
regressICoreConsoleRegressionCommands.cpp
regressBlessICoreConsoleRegressionCommands.cpp
regressCoverageICoreConsoleRegressionCommands.cpp
regressionListICoreRegressionCommands.cpp
regressionTestICoreRegressionCommands.cpp
regressListICoreConsoleRegressionCommands.cpp
reverseReverse the given textICoreCommandSamples.cpp
saveTemplateSave the current diagram level as a reusable subsystem template: saveTemplate <name>ICoreTemplateCommands.cpp
setModelConfigSet one simulation/solver setting: setModelConfig <property> <value>ICoreModelConfigCommands.cpp
setNameICoreModelConfiguratorCommands.cpp
setNameICoreModelConfiguratorCommands.cpp
setNameICoreModelConfiguratorCommands.cpp
setNavigationRootAccessShow or hide the tree above Home: setNavigationRootAccess <on\|off>ICoreNavigationCommands.cpp
setSlowPaceStepDelaySet the slow-pace step delay in millisecondsICoreModelConfiguratorCommands.cpp
templatesList the ready-to-use diagram templates (optionally filtered by category or kind)ICoreTemplateCommands.cpp
tfestMethodsList the system-identification estimators tfest() accepts, with a summary of eachICoreMathToolCommands.cpp
timeSeriesDemoDeclare a demo time series in the variables space (default name: demoSignal)ICoreCommandSamples.cpp
toMatlabICoreMatlabCommandBridge.cpp
trim-slashesStrip leading/trailing slashes from a pathICoreCommandSamples.cpp
useTemplateInsert a subsystem template into a diagram level: useTemplate <id> [parent] [x] [y]ICoreTemplateCommands.cpp

Recipe verbs#

Block-diagram statements, handled by ICoreRecipeInterpreter before the math grammar. These are what a .iscript template is written in (Template catalog — every .iscript).

VerbSignatureMeaning
addPortp = handle.addPort(in|out, type?, facing?)Add a port to a block (type defaults to ICoreDouble; refused if that port list is private)
applyStylelinePathHandle.applyStyle(styleBlob)Apply a ";"-joined ICoreChartLinePath::captureStyle blob (color, pen, visibility, ...) — round-trip, not meant for hand-authoring
areaa? = area(parent?)Create a canvas work area (parent defaults to Home)
autoArrangesubsystemHandle.autoArrange()Auto-arrange every block in a subsystem (handle must be a subsystem's block, as bound by subsystem())
blockhandle = block(type, parent?)Create a block (parent defaults to Home) and bind it to a handle
chartc = handle.chart()Bind a handle to a block's attached chart (Scope-type blocks only) — behaves like a plot() chart handle
clearchartHandle.clearDelete every line path on a chart
clearAllSelectionsselectionModelHandle.clearAllSelectionsDrop everything a selection model currently holds
clearDiagramclearDiagram(parent?)Permanently delete everything in a subsystem (defaults to Home)
clearImageimageHandle.clearImageDrop an image holder's picture, back to the placeholder
clearPortshandle.clearPorts()Delete every port on the block's non-private port lists
commentOuthandle.commentOutComment out a block so it is excluded from the run
connectl? = connect(out<i>|branchHandle, in<j>)Link an output port to an input port (operands may also be port handles), or — with a link-branch handle first — branch that link toward a free input port; l = ... binds the created (root) branch
deletehandle.deletePermanently delete a block, link branch, area, image or textbox (no trash, no undo); deleting a link's root branch deletes the whole link
deselectAreaselectionModelHandle.deselectArea(areaHandle)Remove a canvas area from a selection model
deselectBlockselectionModelHandle.deselectBlock(blockHandle)Remove a block from a selection model
deselectImageselectionModelHandle.deselectImage(imageHandle)Remove an image holder from a selection model
deselectLinkBranchselectionModelHandle.deselectLinkBranch(branchHandle)Remove a link branch from a selection model
deselectTextBoxselectionModelHandle.deselectTextBox(textboxHandle)Remove a text box from a selection model
disableFlushingTimerchartHandle.disableFlushingTimerStop the auto-flush timer (flushing whatever is buffered once more first)
disconnectportHandle.disconnectDetach the port from its link branch; the link stays, with that end left dangling
duplicateselectionModelHandle.duplicate(destination?, dx?, dy?)Clone everything selected into a subsystem (destination defaults to Home), offsetting position by (dx, dy) (+y up, defaults to (0, 0)); clears the model's selection when done
enableFlushingTimerchartHandle.enableFlushingTimerStart auto-flushing buffered points (from pushPoint) onto the chart every 100ms
exportAsImagechartHandle.exportAsImage(path)Export a chart to a png/jpg image (format from the extension)
exportAsPDFchartHandle.exportAsPDF(path)Export a chart to a PDF file
exportAsSVGchartHandle.exportAsSVG(path)Export a chart to an SVG file
exportDataCSVchartHandle.exportDataCSV(path)Export a chart's plotted data to a CSV file
getv? = handle.get(property)Print one block property (name, path, x, y, width, ...); v = ... stores a numeric snapshot in the variables space
getBufferWidthchartHandle.getBufferWidthPrint a chart's streaming buffer width
getConfigv? = handle.getConfig(variableName)Print one non-private block config variable; v = ... stores a numeric snapshot in the variables space
getCornersbranchHandle.getCornersPrint a link branch's path corners in the same '(x, y), ...' form setCorners accepts
getTexttextboxHandle.getTextPrint a text box's text
getTitleareaHandle.getTitlePrint a canvas area's title bar text
hideNamehandle.hideNameHide the name label drawn under a block
holdOnchartHandle.holdOn(matrix)Plot another matrix onto an existing chart, keeping its current lines
imagei? = image(parent?)Create an image holder (parent defaults to Home)
infohandle.infoPrint the block's full property sheet
inputPortp = handle.inputPort(i)Bind a handle to a block's existing input port [i], or chain a port method: handle.inputPort(i).disconnect()
isInfiniteStreamingchartHandle.isInfiniteStreamingPrint whether infinite streaming is on for a chart
listConfighandle.listConfigPrint the block's non-private config variables
loadImageimageHandle.loadImage(path)Load a picture from disk into an image holder (quotes optional)
migrateselectionModelHandle.migrate(destination?, dx?, dy?)Move everything selected into a subsystem (destination defaults to Home), offsetting position by (dx, dy) (+y up, defaults to (0, 0)); clears the model's selection when done
movehandle.move(x, y)Move a block, area, image or textbox relative to the origin anchor (+y is up)
optimizeLinkssubsystemHandle.optimizeLinks()Re-run the link path optimizer over every block in a subsystem (handle must be a subsystem's block, as bound by subsystem())
outputPortp = handle.outputPort(i)Bind a handle to a block's existing output port [i], or chain a port method: handle.outputPort(i).disconnect()
pathp? = chartHandle.path(i)Bind a handle to one of a chart's existing line paths
plotc? = plot(matrix) | plot(x, y) | plot(series)Create a standalone chart window and plot into it: a matrix (vector against index, or each column past the first as its own line against column 0), two equal-length x/y vectors, or a time series (against its recorded time, one line per channel); does not touch the block diagram
pushPointlinePathHandle.pushPoint(x, y)Buffer one point onto a line path (pair with the chart's enableFlushingTimer to see it appear)
removePorthandle.removePort(portHandleOrName)Delete one port from a block (refused if that port list is private)
renamehandle.rename(newName)Rename a block (name must be unique, no special characters)
resizehandle.resize(width, height)Set the width and height of a block, area, image or textbox
rotatehandle.rotate(angle)Set a block's rotation in degrees
selectAreaselectionModelHandle.selectArea(areaHandle)Add a canvas area to a selection model (refused if not a sibling of the model's current selection)
selectBlockselectionModelHandle.selectBlock(blockHandle)Add a block to a selection model (refused if not a sibling of the model's current selection)
selectImageselectionModelHandle.selectImage(imageHandle)Add an image holder to a selection model (refused if not a sibling of the model's current selection)
selectionModels = selectionModel()Create a standalone canvas selection model (not tied to any canvas/tab, does not touch the diagram); the handle must be bound
selectLinkBranchselectionModelHandle.selectLinkBranch(branchHandle)Add a link branch to a selection model (the whole link if it's the root branch); refused if not a sibling of the model's current selection
selectTextBoxselectionModelHandle.selectTextBox(textboxHandle)Add a text box to a selection model (refused if not a sibling of the model's current selection)
setAxisFontchartHandle.setAxisFont(x|y, fontBlob)Set an axis label's font from a ";"-joined ICoreStudioStaticCommands::serializeFont blob (round-trip, not meant for hand-authoring)
setColorareaHandle.setColor(r, g, b[, a] | nameOrHex)Set a canvas area's color (0-255 channels, or a named/#rrggbb color)
setConfighandle.setConfig(variableName, value)Set a non-private block config variable
setCornersbranchHandle.setCorners((x1, y1), (x2, y2), ...)Set a link branch's path corners (at least 2), relative to the origin anchor (+y is up, like move)
setDescriptionportHandle.setDescription(text)Set a port's description label (empty text clears it)
setInfiniteStreamingchartHandle.setInfiniteStreaming(true|false)Toggle whether a chart keeps only the last getBufferWidth() points per line
setMovingWindowWidthchartHandle.setMovingWindowWidth(n)Set how many points a streaming chart keeps per line
setPathNamelinePathHandle.setPathName(text)Rename a chart line path
setTexttextboxHandle.setText(text)Set a text box's text (quotes optional; empty clears)
setTitleareaHandle.setTitle(text)Set a canvas area's title bar text (quotes optional)
showNamehandle.showNameShow the name label under a block again
subsystemhandle = subsystem(parent?)Create a subsystem (parent defaults to Home); the handle binds to its block
textboxt? = textbox(parent?)Create a canvas text box (parent defaults to Home)
uncommenthandle.uncommentRe-include a commented-out block in the run
xlabelchartHandle.xlabel(text)Set a chart's X-axis label
ylabelchartHandle.ylabel(text)Set a chart's Y-axis label

Matrix functions#

From ICoreExpressionEvaluator::functions() — usable in any expression the console or a config field evaluates.

FunctionSignatureMeaning
transposetranspose(A)Transpose of A (same as A')
invinv(A)Inverse of a square matrix A
pinvpinv(A)Moore-Penrose pseudo-inverse of A
detdet(A)Determinant of a square matrix A
tracetrace(A)Sum of the diagonal of a square matrix A
condcond(A)Condition number (max/min singular value)
sqrtmsqrtm(A)Principal matrix square root (square A)
cholchol(A)Cholesky lower factor L, A = L*L^T (SPD A)
nullnull(A)Basis for the null space of A
eigeig(A|sys)Eigenvalues of a matrix or state-space model
eigveceigvec(A)Eigenvectors of a square matrix A (real part)
expmexpm(A)Matrix exponential (square A)
logmlogm(A)Matrix logarithm (square A)
rankrank(A)Numerical rank of A
solvesolve(A,b)Solve A*x = b
diagdiag(A)Vector -> diagonal matrix; matrix -> its diagonal as a vector
kronkron(A,B)Kronecker product of A and B
dotdot(a,b)Dot product of two equal-shaped matrices/vectors
crosscross(a,b)Cross product of two 3x1 vectors
powpow(A,n)Element-wise power A.^n
qrqqrq(A)QR decomposition: orthogonal factor Q
qrrqrr(A)QR decomposition: upper-triangular factor R
lullul(A)LU decomposition: lower factor L (square A)
luuluu(A)LU decomposition: upper factor U (square A)
luplup(A)LU decomposition: permutation matrix P, P*A = L*U
svdusvdu(A)SVD: left singular vectors U
svdssvds(A)SVD: singular values as a column vector
svdvsvdv(A)SVD: right singular vectors V
ldltlldltl(A)LDLT decomposition: unit lower factor L (symmetric A)
ldltdldltd(A)LDLT decomposition: diagonal D as a column vector
ldltpldltp(A)LDLT decomposition: permutation matrix P, P^T*L*diag(D)*L^T*P = A
issymmetricissymmetric(A)1 if A is symmetric, else 0
ispdispd(A)1 if A is symmetric positive-definite, else 0
absabs(A)Element-wise absolute value
expexp(A)Element-wise exponential
loglog(A)Element-wise natural logarithm
sqrtsqrt(A)Element-wise square root
sinsin(A)Element-wise sine (radians)
coscos(A)Element-wise cosine (radians)
tantan(A)Element-wise tangent (radians)
eminemin(A,B)Element-wise minimum (B may be a scalar)
emaxemax(A,B)Element-wise maximum (B may be a scalar)
clampclamp(A,lo,hi)Clamp every element of A into [lo,hi]
mpowermpower(A,n)Matrix power A^n (integer n; negative uses inverse)
gtgt(A,B)Element-wise A > B
ltlt(A,B)Element-wise A < B
gege(A,B)Element-wise A >= B
lele(A,B)Element-wise A <= B
eqeq(A,B)Element-wise A == B (tolerance-based)
nene(A,B)Element-wise A != B (tolerance-based)
randrand(r,c)r x c matrix, uniform random in [0,1)
randnrandn(r,c)r x c matrix, standard normal random
sumsum(A)Sum of all elements of A
meanmean(A)Mean of all elements of A
maxmax(A)Largest element of A
minmin(A)Smallest element of A
normfronormfro(A)Frobenius norm
normrmsnormrms(A)RMS norm
norm1norm1(A)1-norm (max absolute column sum)
norm2norm2(A)2-norm (largest singular value, power iteration)
norminfnorminf(A)Infinity norm (max absolute row sum)
nucnormnucnorm(A)Nuclear norm (sum of singular values)
sumrowssumrows(A)Sum of each row, as a column vector
sumcolssumcols(A)Sum of each column, as a row vector
meanrowsmeanrows(A)Mean of each row, as a column vector
meancolsmeancols(A)Mean of each column, as a row vector
maxrowsmaxrows(A)Largest element of each row, as a column vector
maxcolsmaxcols(A)Largest element of each column, as a row vector
minrowsminrows(A)Smallest element of each row, as a column vector
mincolsmincols(A)Smallest element of each column, as a row vector
cumsumcumsum(A)Cumulative sum (down columns, or along a row vector)
cumprodcumprod(A)Cumulative product (down columns, or along a row vector)
reshapereshape(A,r,c)Reshape A into r x c, same element order
flipudflipud(A)Flip A vertically (reverse row order)
fliplrfliplr(A)Flip A horizontally (reverse column order)
repmatrepmat(A,r,c)Tile A r times vertically, c times horizontally
linspacelinspace(a,b,n)n evenly spaced points from a to b, as a column vector
logspacelogspace(a,b,n)n points spaced logarithmically from 10^a to 10^b
covcov(A)Covariance matrix of A's columns (rows = observations)
corrcorr(A)Correlation matrix of A's columns
normalizenormalize(v)Unit vector v / \|\|v\|\|
angleangle(a,b)Angle between two vectors, in radians
lyaplyap(A,Q)Continuous Lyapunov: solves A*X + X*A' + Q = 0
dlyapdlyap(A,Q)Discrete Lyapunov: solves A*X*A' - X + Q = 0
sylvestersylvester(A,B,C)Solves A*X + X*B = C
carecare(A,B,Q,R)Continuous algebraic Riccati equation: A'X+XA-XBR^-1B'X+Q=0 (LQR gain design)
daredare(A,B,Q,R)Discrete algebraic Riccati equation: A'XA-X-A'XB(R+B'XB)^-1B'XA+Q=0 (LQR gain design)
fftfft(x)Discrete Fourier transform; returns the N x 2 [real,imag] spectrum
ifftifft(X)Inverse DFT of an N x 2 [real,imag] spectrum -> time-domain signal
fftmagfftmag(x)Magnitude of fft(x)
fftphasefftphase(x)Phase (radians) of fft(x)
interp1interp1(x,y,xq[,degree])Spline-interpolate y=f(x) at query points xq (default cubic)
quatfromaxisanglequatfromaxisangle(axis,angle)Quaternion from a rotation axis and angle (radians)
quatfromeulerquatfromeuler(yaw,pitch,roll)Quaternion from ZYX Euler angles (radians)
quat2rotmquat2rotm(q)Quaternion to 3x3 rotation matrix
rotm2quatrotm2quat(R)3x3 rotation matrix to quaternion
quat2eulerquat2euler(q)Quaternion to ZYX Euler angles (radians)
quatmulquatmul(q1,q2)Hamilton product q1*q2 (compose rotations)
quatconjquatconj(q)Quaternion conjugate
quatinvquatinv(q)Quaternion inverse
quatnormalizequatnormalize(q)Unit-normalize a quaternion
quatslerpquatslerp(q1,q2,t)Spherical linear interpolation, t in [0,1]
rotatevectorrotatevector(q,v)Rotate 3x1 vector v by quaternion q
tfesttfest(u,y,numOrder,denOrder,Ts[,"method"])Fit a discrete transfer function of given order to input/output data; the optional method names one of the 10 estimators (see tfestMethods)
tfestfittfestfit(u,y,numOrder,denOrder,Ts[,"method"])NRMSE fit percentage of that same estimate (100 = exact)
simtfsimtf(tf,u)Simulate discrete transfer function tf's response to input u
gradientgradient("expr",x0)Central-difference gradient of a scalar expression (vars x1..xn) at x0
polypoly([..])Polynomial from descending coefficients
tftf(num,den[,Ts])Transfer function from coefficient vectors
ssss(A,B,C,D[,Ts])State-space model from matrices
timeSeriestimeSeries(time,values)Time series from an N-element time vector and an N x M value matrix
timeseries.time()Time vector of a time series, as an N x 1 matrix
valuesseries.values()Value block of a time series, as an N x M matrix
tf2sstf2ss(G)State-space realization of a transfer function
ss2tfss2tf(sys)Transfer function of a SISO state-space model
rootsroots(p)Roots of a polynomial / coefficient vector
polespoles(G|sys)Poles of a transfer function or state-space model
zeroszeros(G)Zeros of a transfer function
dcgaindcgain(G)DC gain of a transfer function
isstableisstable(G|p)1 if stable, else 0
ctrbctrb(sys)Controllability matrix
obsvobsv(sys)Observability matrix
bodebode(G,wStart,wEnd,n)Nx3 [omega, magnitude_dB, phase] logarithmic frequency sweep
nyquistnyquist(G,wStart,wEnd,n)Nx2 [real, imag] of G(jw) over a logarithmic frequency sweep
rootlocusrootlocus(G,gains)Closed-loop poles under unity feedback, swept over gains (Nx2 [real,imag])
stepstep(G[,duration[,points]]) / G.step(...)Step response as a time series (ZOH-sampled if G is continuous); no duration picks one from the poles
impulseimpulse(G[,duration[,points]]) / G.impulse(...)Impulse response as a time series (unit-area Dirac if G is continuous); no duration picks one from the poles
rampramp(G[,duration[,points]]) / G.ramp(...)Ramp response as a time series; no duration picks one from the poles
polezeroG.polezero()Plot poles and zeros on one complex plane (plot-only; use poles()/zeros() for values)
butterlpbutterlp(order,cutoffHz,fsHz)Discrete Butterworth lowpass transfer function
butterhpbutterhp(order,cutoffHz,fsHz)Discrete Butterworth highpass transfer function
butternotchbutternotch(order,centerHz,bandwidthHz,fsHz)Discrete Butterworth band-stop (notch) transfer function