how to store udp data in struct matlab

I have radar data received from udp, how can I store in some format to access it

7 件のコメント

Rik
Rik 2021 年 7 月 16 日
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).
Rashi Mehrotra
Rashi Mehrotra 2021 年 7 月 16 日
Thanks. but can u elaborate on my question.
I donot have problem with Matlab basics anyway.
KSSV
KSSV 2021 年 7 月 16 日
There are mutiple ways to achieve this. How one can elaborate without knowing how the data is and what format you are targetting?
Rashi Mehrotra
Rashi Mehrotra 2021 年 7 月 16 日
the format is struct and the data are values of distance and direction
Rik
Rik 2021 年 7 月 16 日
Is your question how to access the data in a field of a struct? How to work with structs is part of the Matlab basics.
What exactly is your question?
Rashi Mehrotra
Rashi Mehrotra 2021 年 7 月 16 日
I am getting some data from udp. how to access that data and store in struct
Rik
Rik 2021 年 7 月 16 日
You're making it difficult to help you. Have a read here and here.
You're getting 'some data'. Well, I suggest you use 'some code' access that data. Without context it is difficult to help you. What data are you getting exactly? What functions are you using to get it? What class and shape is it?

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

回答 (1 件)

KSSV
KSSV 2021 年 7 月 16 日

0 投票

S(1) = struct ;
S(1).distance = rand(10,1) ; % your distance array
S(1).direction = rand(10,1) ; % your direction array
If you have multiple region data, you can save them into different structure arrays.

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

質問済み:

2021 年 7 月 16 日

コメント済み:

Rik
2021 年 7 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by