How to display histogram

38 visualizaciones (últimos 30 días)
Azam Ikhwal
Azam Ikhwal el 11 de Mayo de 2022
Respondida: Yash el 28 de Ag. de 2024
Cannot display the histogram. Basicly, I want to plot the data from CSV file. It worked on other csv file.
data = csvread('CorelationCoefficient_All.csv');
x = data(:,1);
histogram(x);
  3 comentarios
Azam Ikhwal
Azam Ikhwal el 16 de Mayo de 2022
Apologies for the delayed response. My csv file was so big even after compressed. So I deleted few lines of data but still keep the format the same.
Mathieu NOE
Mathieu NOE el 16 de Mayo de 2022
hello
It works ! (on my R2020b)
where is your issue ? what is the rror message ?

Iniciar sesión para comentar.

Respuestas (1)

Yash
Yash el 28 de Ag. de 2024
Hello Azam,
I tried executing the given code with the provided CSV file. I am able to get the histogram as shown below:
There could be several reasons why you are facing this issue. Here are some possible suggestions to troubleshoot the problem:
1. File Path: Ensure that the path to the CSV file is correct. If the file is not in the current working directory, you should provide the full path to the file.
2. Outdated function: In the newer MATLAB releases, "csvread" is not recommended. You should consider using "readmatrix" or "readtable" instead. Please find the following relevant documentations:
3. Error Messages: Please check for any error messages in MATLAB’s command window. These messages can provide clues about what might be going wrong.
4. Permissions: Check if there are any permission issues with accessing the file.
If none of these suggestions resolve the issue, kindly provide more details about the error message or behavior you are encountering so that we can assist further.

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by