in my program, i retrieve .csv data using load, but why is there an error when retrieving the data? . anyone can help me?

File1 = load('D:\OFAN SETYA RAHAYU\STMKG\30cm\random3.csv');
a=File1(:,1);
x=File1(:,2);
xq=min(x):0.075:max(x);
a = a-mean(a);
adet = detrend(a);

2 Kommentare

hello
how does the csv looks like ?
insteadd of load, use readtable , readcell, readmatrix or importdata
I attached the csv file.
i have used 'readtable' to call data from .csv. but after that there was an error when I searched for the minimum and maximum values of the data in one column. can u solve this?
this is the error message : " error to use min(x). Invalid data type. The first argument must be numeric or logical."

Melden Sie sich an, um zu kommentieren.

Antworten (1)

hello again
it worked fine with readtable , here I simply plot the first variable of the table and it's min value
T = readtable('random3.csv');
x = T.Var1;
plot(x);
[val,ind] = min(x);
hold on , plot(ind,val,'rd');

Produkte

Version

R2018a

Gefragt:

am 8 Jun. 2021

Kommentiert:

am 8 Jul. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by