How to insert a cell array elements in another cell array

25 ビュー (過去 30 日間)
Behrooz Daneshian
Behrooz Daneshian 2023 年 1 月 2 日
コメント済み: Behrooz Daneshian 2023 年 1 月 2 日
Hi all and happy new year,
I have 3 same size cells, A={data.results.id}',B={data.results.mindate}', and C={data.results.maxdate}. Please assume that all have the dimension of 1000*1. I also have another cell called Stations which is 1000*3. What I want to do is to insert each elements of A in the first column of Stations, each elements of B in the second column of Stations, and finally each elements of C in the third column of stations. can anyone help me with this regard?
  2 件のコメント
Image Analyst
Image Analyst 2023 年 1 月 2 日
Make it easy for us to help you, not hard. Attach your A, B, and C cells in a .mat file with the paperclip icon.
save('behrooz.mat', 'A', 'B', 'C', 'Stations');
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
I'll check back later for it.
Behrooz Daneshian
Behrooz Daneshian 2023 年 1 月 2 日
Thank you for your reply.
A, B, and C mfiles are attached here.

サインインしてコメントする。

採用された回答

Cameron
Cameron 2023 年 1 月 2 日
Is this what you're looking for?
Stations = [A,B,C];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by