Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Hello everyone, I have a problem and need its solution. I have applied loop (say chi angle iteration) on input data that was loaded as .dat file. Now I want to see results (graphically and numerically) against each rotation angle, how can I find

1 Ansicht (letzte 30 Tage)
Hello, This code does not have any trouble. Problem is to move next step. I will try to clear my question. See, I have three input columns of P wave velocity (Vp), S wave velocity (Vs) and density (Rho). Each column (Vp, Vs, Rho) has 202 elements (numerical values) and by using these elements I have computed EEI (a fourth column). But EEI is also dependent on the angle (Chi angle or rotation angle). So I used iteration/loop and try to vary chi angles between -90 to +90. In other words, by using three columns of Vp, Vs, Rho I need to compute 181 EEI columns (between -90 to +90). But I am not clear how to plot and show these 181 graphs of EEI further
%% The Input data comprizes on seismic velocities and density...
load VelRhob.dat -ASCII % load input file in ascii format
size(VelRhob)
Depth = VelRhob(:,1); % Depth in meters
Vp = VelRhob(:,2); % P wave velocity in km/s
Vs = VelRhob(:,3); % S wave velocity in km/s
Rho = VelRhob(:,4); % Density in gm/cm3
Vp2 = power(Vp,2); % Element-wise power/sq. of input P velocity
Vs2 = power(Vs,2); % Element-wise power/sq. of input S velocity
Vp0 = mean(Vp); % Mean of P velocity
Vs0 = mean(Vs); % Mean of S velocity
Rho0 = mean(Rho); % Mean of density
k = (Vs0/Vp0)^2; % Constant for EEI-- Extended elastic imp.
a = Vp0*Rho0;
min_angle = -90;
max_angle = 90;
int_angle = 5;
angle = min_angle:int_angle:max_angle;
for ii=1:length(angle)
Chi(ii) = angle(ii)*pi/180;
p = cos(Chi(ii))+sin(Chi(ii));
q = -8*k*sin(Chi(ii));
r = cos(Chi(ii))-4*k*sin(Chi(ii));
eei1 = rdivide(Vp,Vp0);
eei2 = rdivide(Vs,Vs0);
eei3 = rdivide(Vs,Vs0);
eei11(ii) = power(eei1(ii),p);
eei12(ii) = power(eei2(ii),q);
eei13(ii) = power(eei3(ii),r);
eei(ii) = times(eei11(ii),eei12(ii));
eeii(ii) = times(eei(ii),eei13(ii));
EEI(ii) = times(a,eeii(ii));
I need to find out EEI as function of Chi angle on coulmns data
  3 Kommentare
Image Analyst
Image Analyst am 14 Okt. 2017
"I want to see results (graphically..."
Are you just looking for someone to tell you that there is a "plot()" function? Or area() or bar() or other functions?
Ahmed
Ahmed am 15 Okt. 2017
Bearbeitet: per isakson am 15 Okt. 2017
Dear Simon,
This code does not have any trouble. Problem is to move next step. I will try to clear my question.
See, I have three input columns of P wave velocity (Vp), S wave velocity (Vs) and density (Rho). Each column (Vp, Vs, Rho) has 202 elements (numerical values) and by using these elements I have computed EEI (a fourth column). But EEI is also dependent on the angle (Chi angle or rotation angle). So I used iteration/loop and try to vary chi angles between -90 to +90. In other words, by using three columns of Vp, Vs, Rho I need to compute 181 EEI columns (between -90 to +90). But I am not clear how to plot and show these 181 graphs of EEI further

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by