Cannot plot graph from csv file

4 visualizaciones (últimos 30 días)
Muhammad Izzuddin Najat Mohamad Sabr
Muhammad Izzuddin Najat Mohamad Sabr el 19 de Oct. de 2020
clear;
clc;
m = csvimport('BaselineAzli.csv');
B = rmmissing(m)
disp(B)
a = B{:,1}
b = B{:,2}
%Fs = 0.333;
%T = 1/Fs;
%L = 30750;
%B = (0:L-1)/T;
%figure(1)
plot(a,b)
so here is the code that i;ve been working on. Matlab says error using plot because of invalid data argument along with error in line plot. is there a problem with the code or the data itself??

Respuesta aceptada

Mario Malic
Mario Malic el 19 de Oct. de 2020
MATLAB has an amazing import tool (feature in the toolbar) that you can use to import your data from. You can import the data directly into the workspace, but I would suggest you to generate a script that does it, there you can see the generated code and fix issues in yours.
  1 comentario
Muhammad Izzuddin Najat Mohamad Sabr
Muhammad Izzuddin Najat Mohamad Sabr el 21 de Oct. de 2020
Thanks!! But i've already solve it. Turns out i have to convert it from array to cell and then, plot the graph

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots 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