タイムシリーズデータのプロットについて
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kengo Atomi
el 12 de Jun. de 2020
Respondida: Kenta
el 12 de Jun. de 2020
下図のようなtimeseriesデータ(時系列名はa)があるのですが、plot(a)とすると、データ1~ すべてのデータが同時にプロットされてしまいます。
データ1のみをプロットしたいのですが、何か方法はあるのでしょうか。
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/314795/image.png)
0 comentarios
Respuesta aceptada
Kenta
el 12 de Jun. de 2020
ts = timeseries(rand(10));
data1=ts.Data(:,1)
time=ts.Time
figure;plot(time,data1);title('time vs data1')
こんにちは、ある変数(データ)の中に、さらに変数(data1など)がある場合は、その変数名.(ドット)に続けて、ほしい変数名(data1)を打てば得られる場合が多くあります。
今回のようなtimeseries型のデータでも同様に、data1やTimeの値を上のように得ることができて、それを利用すればプロットすることができます。確認のため;をつけて値がコマンドウィンドウに表示されるようにしています。以上、役に立てば幸いです。
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!