asterisks4

printing asterisks in a triangular shape using nested for loops

You are now following this Submission

This code demonstrates how to use nested for loops in MATLAB to build a triangular shape constructed by asterisks (*).

Cite As

Mahdi Zolfaghari (2026). asterisks4 (https://www.mathworks.com/matlabcentral/fileexchange/68195-asterisks4), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Loops and Conditional Statements in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0