Skip to content

MAE Learning

My Automobile Engineering

  • CoursesExpand
    • MBD BasicExpand
      • Introduction to Model Based Development for Automotive Using SIMULINK
      • Introduction to MATLAB Scripting for Automobile Engineering
      • Introduction to Model Based Development for Automotive โ€“ Basic Understanding
      • Learn MBD concept focus on MIL and SIL Testing
    • MBD IntermediateExpand
      • Simulink for Automotive with Model-Based Development Basics
      • MATLAB Scripting with Model-Based Development Basics
      • MATLAB Simulink and Scripting Foundations for Automotive MBD
    • MBD AdvanceExpand
      • A Complete Automotive Model Based Development
    • UDS CourseExpand
      • Complete Beginner Program in Automotive MBD and UDS
      • Introduction To Unified Diagnostic Services (UDS) โ€“ AUTOSAR and MBD Explained
    • EV CourseExpand
      • Introduction to Battery Technology for Electric Vehicle
    • Free Course
    • Courses Demo Video
  • Study MaterialExpand
    • Automotive EmbeddedExpand
      • Automotive Embedded
      • Software Development
    • MATLABExpand
      • MATLAB Interview Q&A
      • Simulink Tutorial
      • M-Scripting Tutorial
    • AUTOSARExpand
      • AUTOSAR Architecture
    • ISO 26262
  • Blogs
  • MoreExpand
    • About Us
    • Terms and Conditions
    • Contact Us
    • Disclaimer
    • Privacy Policy
Support Login Course Login
MAE Learning
My Automobile Engineering
Support Login Course Login

Block Properties in Simulink

What Are Block Properties?

In Simulink, every block has properties that control how it works in the model. You can change these properties using MATLAB scripts, which helps in automation, tuning and model setup.

Examples of block properties:

  • Parameter values like Gain = 5
  • Data type and signal size
  • Sample time or how often it runs
  • Execution order or priority
  • Notes or documentation
  • Block name, type, position, and direction
  • Commented status, whether the block is active or disabled

Accessing Block Properties via Scripting

We use get_param() and set_param() functions.

% Get a parameter
val = get_param('model/Gain', 'Gain');
% Set a parameter
set_param('model/Gain', 'Gain', '10');

Common Block Properties

Example โ€“ Automating Model Parameter Updates

model = 'engine_model';
load_system(model);
set_param([model '/Throttle'], 'Gain', '2.5');
save_system(model);

Workspaces in MATLAB

What Is a Workspace?

A workspace is a memory space where MATLAB keeps variables. Simulink can use different workspaces, such as for models, masked subsystems, and the base MATLAB workspace.


Types of Workspaces


Using Workspaces in Practice

Assigning Variables to Base Workspace

assignin('base', 'speed_limit', 100);

Evaluating Expression in Another Workspace

val = evalin('base', 'speed_limit + 20');

Accessing Model Workspace

ws = get_param('my_model', 'ModelWorkspace');
ws.assignin('gain_factor', 5.5);

Automotive Use Cases


๐Ÿ”ฅ Top Posts
  • Loading...

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 10 other subscribers
  • 55,964 hits
โญโญโญโญโญ 4.9/5 Google Reviews
ยฉ 2026 MAE Learning. All Rights Reserved.

Categories

Archives

Follow Us

Blog Stats

  • 55,964 hits

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 10 other subscribers
Scroll to top
MAE Learning
WhatsApp
Need Help?
Ask here
  • Courses
    • MBD Basic
      • Introduction to Model Based Development for Automotive Using SIMULINK
      • Introduction to MATLAB Scripting for Automobile Engineering
      • Introduction to Model Based Development for Automotive โ€“ Basic Understanding
      • Learn MBD concept focus on MIL and SIL Testing
    • MBD Intermediate
      • Simulink for Automotive with Model-Based Development Basics
      • MATLAB Scripting with Model-Based Development Basics
      • MATLAB Simulink and Scripting Foundations for Automotive MBD
    • MBD Advance
      • A Complete Automotive Model Based Development
    • UDS Course
      • Complete Beginner Program in Automotive MBD and UDS
      • Introduction To Unified Diagnostic Services (UDS) โ€“ AUTOSAR and MBD Explained
    • EV Course
      • Introduction to Battery Technology for Electric Vehicle
    • Free Course
    • Courses Demo Video
  • Study Material
    • Automotive Embedded
      • Automotive Embedded
      • Software Development
    • MATLAB
      • MATLAB Interview Q&A
      • Simulink Tutorial
      • M-Scripting Tutorial
    • AUTOSAR
      • AUTOSAR Architecture
    • ISO 26262
  • Blogs
  • More
    • About Us
    • Terms and Conditions
    • Contact Us
    • Disclaimer
    • Privacy Policy
Loading Comments...
Search