I'd like to know how to make histogram with matlab raw data file.

6 Ansichten (letzte 30 Tage)
HYUK BIN KWON
HYUK BIN KWON am 21 Nov. 2022
Beantwortet: William Rose am 21 Nov. 2022
I'd like to know how to make histogram with matlab raw data file.
this is my raw data file.
I have 10,000 raw data file and i'd like to make a histogram with this data.
I tried //histogram(my_file.raw)// but it doesn't work. the error message is my data is complx, instead function need real data.
to sum it up,
I'd like to know how to import my raw data to my matlab variable and how to make a histogram with my complex raw data.
Thank you very much.

Antworten (1)

William Rose
William Rose am 21 Nov. 2022
I recommend that you read the help for load and for importdata, and try the examples provided.
histogram(x) does not work with complex x. A histogram of complex data would be a 3D plot.
You can do
histogram(real(x))
histogram(imag(x))
histogram(abs(x));
There are functions to make a histogram of complex data, in the Matlab File Exchange, such as this package.
Good luck.

Community Treasure Hunt

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

Start Hunting!

Translated by