struct2values() - MATLAB Cody - MATLAB Central

Problem 43605. struct2values()

Difficulty:Rate

Convert a struct object into a column vector. You can assume that the struct elements are scalars

Example:

a = struct();
a.b = 1;
a.c = 4;
a.e = 55;

Requested output:

[1;4;55]

Solution Stats

50.72% Correct | 49.28% Incorrect
Last Solution submitted on Jun 27, 2025

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
2
3

Problem Recent Solvers34

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

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

Start Hunting!