Normalize data set
1 次查看(过去 30 天)
显示 更早的评论
Hi
I have a data set giving me (time, voltage), and I wish to normalize the data set. Is there a smart way to do this in MatLAB?
Also, is there a way to integrate such a data set?
Best wishes amd thanks for any help, Niles.
0 个评论
回答(2 个)
bym
2012-5-13
v = rand(1,100); %invent data
t = linspace(1,10,100);
vn = v./max(v); %normalize
integral = trapz(t,vn);
0 个评论
Image Analyst
2012-5-13
Depends on how you define integrate. Maybe you want sum(data(:)), then to normalize
normalizedData = data ./ sum(data(:));
Or you can divide by the max of the data instead of the sum of it all, depending on how you define normalize. There are different definitions you know. What's yours?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!