Return strings encapsulated by braces - MATLAB Cody - MATLAB Central

Problem 43076. Return strings encapsulated by braces

Difficulty:Rate

Return all substrings that are contained within braces ({}).

For example:

str = 'x = rho*x{-1} + (1-rho)*y{+1}';

when passed to the function, should return a cell with '-1' and '+1' as its contents.

Solution Stats

45.95% Correct | 54.05% Incorrect
Last Solution submitted on Aug 23, 2025

Problem Comments

Solution Comments

Show comments
AI Is Transforming Engineering Workflows
It’s an honor to deliver the keynote at MATLAB EXPO 2025. I'll...
0
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers32

Suggested Problems

More from this Author9

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!