×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

(OP)
I'm doing the reading of a file. DAT, need to read the columns and make some calculations, my concern is this, each column are values of speed, these values will either increase or decrease up to a nearly constant value,
Almost constant, because when it reached steady state, the values fluctuate slightly neighborhood of a constant value that would be the stable speed, but there is no tendency to grow or decline (line with zero slope).
Now I must read the data from the position it reaches the constant speed of calculations,
One idea was to calculate a slope when the slope is zero, this would be the rate constant value ... start reading the data for the calculations, but when it comes to the stable state or whether it varies slightly from one point to another, the slope can be positive or be negative, but neighborhood of a point,
I do not know how to read the data properly

thanks!

unums = [2 3 5 6 7 8 9 10 11 12 4 13 14 16 17 18 19 20 21 22 23 15];

% I'd like to start reading each column from reaching a nearly constant velocity.

for i = 1:length(unums)
un = unums(i);
u(:,i) = m(:,un);

Y=abs(fft(u(:,i)))/length(u);

n=length(Y);

power(:,i) = abs(Y(1:floor(n/2))).^2/;
nyquist = 1/2;
freq = ((1:n/2)/(n/2)*nyquist)';

% regresion de todos los puntos
[a0,a1]=Linear_regression(log10(freq),log10(power(:,i)));

%a1 = -5/3; % para que la linea tenga pendiente definida
%a0 = log10(power(3000,i)) - (-5/3)*log10(freq(3000));% usando el dato medio
powerfit(:,i) = 10.^(a0 + a1*log10(freq));%reg todo.

a0_matriz(i) = a0;
a1_matriz(i) = a1
M=a1_matriz';

B=(1-i)/10; % indica la altura en metros do ponto de monitoreamento no Riser

% PLOT HORIZONTAL IMPAR %

if i<12 && mod(i,2)==1
subplot(2,6,(i/2+0.5));
loglog(freq,power(:,i),'b',freq,powerfit(:,i),'k:');
L2 = ['h = ' num2str(-B) ' m'];
L3 = ['m = ' num2str(a1,3)];
title({L2;L3},'FontSize',8);
%axis tight;
elseif i>=12 && mod(i,2)==0
subplot(2,6,(i/2+1));
loglog(freq,power(:,i),'b',freq,powerfit(:,i),'k:');
%L2 = ['h = ' num2str(-B) ' m'];
L3 = ['m = ' num2str(a1,3)];
title({L3},'FontSize',8);
%axis tight;

%set(gca,'xtick',[],'ytick',[])
[ax1,h1]=suplabel('super X label');
[ax2,h2]=suplabel('super Y label','y');
%set(h1,'\bf','FontSize',15);
H=labelEdgeSubPlots('\fontsize{14}\bf\kappa (Hz)','\fontsize{12}\bfEnergia (J)',1);

end

end

(OP)

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Industry Perspective: Education and Metal 3D Printing
Metal 3D printing has rapidly emerged as a key technology in modern design and manufacturing, so itâ€™s critical educational institutions include it in their curricula to avoid leaving students at a disadvantage as they enter the workforce. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!