Contenuto principale

cktblock

Create linear circuit or switched circuit block

Since R2026a

Description

blockpath = cktblock(circuit,model,Name=Value) creates a linear circuit or switched circuit Simulink® block from a Simscape™ electrical diagram or subsystem or a circuit configuration object.

Input Arguments

collapse all

Simscape electrical diagram or subsystem or a circuit configuration object used to create the Simulink block, specified either as a schematic or as an object. For more information, see cktconfig.

The library path of the Simulink model in which the function creates and inserts the newly constructed block.

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: blockpath = cktblock(circuit,model,BlockName='Power Train'); creates a Power Train block in the specified Simulink model.

Name on the icon if the function builds a Simulink block, specified as a string.

Name of the block instance in the Simulink model, specified as a string.

Device noise sources in the circuit, specified as an n×6 cell array. The function uses resistors to model the device noise sources. The cell array contains the following information:

ColumnDescription
NameThe circuit element designator.
EnabledOption to indicate if the noise source is active, specified as true or false. Set the value to true to indicate that the noise source is active.
Noise coefficientThe RMS amplitude of the noise source. If empty, the function uses Johnson/Nyquist noise value based on the value of the resistor.
Corner frequencyThe frequency below which the flicker noise has a higher amplitude than the white Gaussian noise. This value may equal zero to indicate an absence of flicker noise.
Independent noiseOption to indicate if the device noise is correlated with other noise sources, specified as true or false. Set the value to true to indicate the device noise is independent off other noise sources.
SeedAn integer used to select the sequence of random samples. A value of 0 indicates an independent noise source. For multiple device noise outputs, set the value to the same non-zero integer value for all noise sources that share the same source.

The average temperature of the circuit, specified as a real scalar in degrees Celsius.

Output Arguments

collapse all

The path to the constructed block, returned as a string.

Version History

Introduced in R2026a