필터 지우기
필터 지우기

I have 3 double array of sizes 6x1 double, 4x1 double and 5x1 double. I like to combine them to make a structure of size 1x3 struct containing all these 3 double arrays.

조회 수: 5 (최근 30일)
I have 3 double array of sizes 6x1 double, 4x1 double and 5x1 double. I like to combine them to make a structure of size 1x3 struct containing all these 3 double arrays.
If we click on 1x3 struct, inside it should look like this:
Fields times
1 6x1 double
2 4x1 double
3 5x1 double
How can I do it? Could you kindly help? Thank you.

채택된 답변

Stephen23
Stephen23 2023년 1월 11일
A = rand(6,1);
B = rand(4,1);
C = rand(5,1);
S = struct('times',{A,B,C})
S = 1×3 struct array with fields:
times

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by