smbCreateSubsystem

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.0, Creation date: 2016-11-11, Last change: 2025-09-14

SimMechanics creates and opens a subsystem

Description

The susbsytem file is created in the current working directory (pwd)

See Also: smbCreateSubsystem , smbConvertSubsystem

Example Illustration

 missing image of smbCreateSubsystem(SSName)

Syntax

smbCreateSubsystem(SSName)

Input Parameter

SSName: Namestring of a Subsystem




Copyright 2016-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This algorithm is a MATLAB function named smbCreateSubsystem from the SG-Library, designed to create and open a SimMechanics subsystem. Below is a detailed explanation of the algorithm and its parameters.

Input Parameters

Algorithm Steps

  1. The function checks if the input parameter SSName is provided. If not, it defaults to 'Subsystem'.
  2. The function uses find_system to identify all blocks in the current system (gcs) with a search depth of 1. This means it only looks at the top-level blocks.
  3. The function calls smbConvertSubsystem with the SSName and all blocks found except the first one. This suggests that the first block might be the system itself or a block that should not be converted.

Function Details

The algorithm is straightforward, focusing on creating a subsystem from existing blocks in a Simulink model. It assumes that the user is working within a Simulink environment and has a model loaded as the current system.

Algorithm explaination created using ChatGPT on 2025-08-18 22:19. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21