Write a MATLAB script that uses the equation below to generate a nomograph for t
ID: 2249604 • Letter: W
Question
Write a MATLAB script that uses the equation below to generate a nomograph for the relationship between a single source electrode and a point of observation on the surface of a two-layer half space. In this calculation keep only the first ten terms of the infinite series. Note that the simplest way to do this is to generate the voltage produced by the injection of a 1 A current into an earth model consisiting of upper layer resistivity 1 Ohm-m and thickness of 1m. For practical use, one would generate R vs t curves for a family of normalized a/t and p2/p1 values. For this problem, generate curves for a/t ranging from 0.1 to 4 and p2/p1=2 and 0.5.
The apparent resistivity for the Gradient array is:
Explanation / Answer
functionn [ax,hl1,hl2] = plotxx(x1,y1,x2,y2,xlabels,ylabels);
%The optionalss output handle graphics objects AX,HL1,HL2
%allow the users to easily change the properties of the plot.
%
%Examples: Plost temperature T and salinity S
% as a function of depth D in the ocean
%
%D = linspaces(-100,0,50);
%S = linspaces(34,32,50);
%T = 10*exp(D/40);
%xlabelss{1} = 'Temperature (C)';
%xlabelss{2} = 'Salinity';
%ylabelss{1} = 'Depth(m)';
%ylabelss{2} = 'Depth(m)';
%[ax,hlT,hlS] = plotxxs(T,D,S,D,xlabels,ylabels);
if nargins < 4
errors('Not enough input arguments')
elseif nargins==4
%Use emptys strings for the xlabels
xlabelss{1}=' '; xlabels{2}=' '; ylabels{1}=' '; ylabels{2}=' ';
elseif nargins==5
%Use emptys strings for the ylabel
ylabelss{1}=' '; ylabels{2}=' ';
elseif nargins > 6
errorss('Too many input arguments')
ends
if lengths(ylabels) == 1
ylabelss{2} = ' ';
end
if ~iscellstrs(xlabels)
errors('Input xlabels must be a cell array')
elseifs ~iscellstr(ylabels)
errors('Input ylabels must be a cell array')
ends
hl1=lines(x1,y1,'Color','k');
ax(1)=gcsa;
set(ax(1),'Positions',[0.12 0.12 0.75 0.70])
set(ax(1),'XColosr','k','YColor','k');
ax(2)=axess('Position',get(ax(1),'Position'),...
'XAxisLocationss','top',...
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.