データ インスペクター ログデータのエクスポート
4 views (last 30 days)
Show older comments
Yuma Yamazaki
on 27 Jun 2019
Answered: Yuma Yamazaki
on 6 Jan 2020
データインスペクターで複数データのエクスポートは可能でしょうか?
複数データを選択しエクスポートしても1×1Dataset型のデータしか生成されません。
下記、例になります。
<例>3つのデータをデータ インスペクターからエクスポートしたい
1.モデルの設定
対照の3データは全てログ設定済み
![図1.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226569/%E5%9B%B31.png)
2.コンフィギレーションパラメータの設定
![図2.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226570/%E5%9B%B32.png)
3.対象データのエクスポート
1×1Dataset型のデータしか生成されない
![図3.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226571/%E5%9B%B33.png)
![図4.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226572/%E5%9B%B34.png)
4.備考
1データだけなら意図した値をエクスポートしてくれます
![図6.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226573/%E5%9B%B36.png)
以上
0 Comments
Accepted Answer
More Answers (1)
stozaki
on 31 Dec 2019
ご質問頂き、ありがとうございます。
既に解決されているかもしれませんが、Datasetには複数のログデータがオブジェクトの形で格納されています。
Yuma Yamazaki様が作成されたように'data'という名前のDatasetを想定しています。なお、MATLABのバージョンが幾つをご利用かわかりませんでしたので、画面の見た目からR2015a前後と認識し、R2015aで実行したものを記載致します。
ベースワークスペースにdataという名前のDatasetが保存されていると思います。
MATLABコマンドウィンドウで、dataと実行します。
data
と実行すると、次のようにdataには3つの要素が格納されていることがわかります。
![data_1.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257756/data_1.png)
出力されているコメントを見て頂くと、getまたはgetElementを使って、要素にアクセスできるようになっています。
例えば、1番目の要素 Constatn のデータへアクセスする場合、次のように実行します。
![data_2.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257757/data_2.png)
data.get(1)
% 値を取得する場合
data.get(1).Values
% 時刻データを取得する場合
data.get(1).Values.Data
2つ目、3つ目の要素は、同様にget(2)、get(3)とすれば、対象の要素へアクセスできます。
是非、お試し頂ければと思います。
0 Comments
See Also
Categories
Find more on Seismology in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!