0
$\begingroup$

I have the following problem:

L = 300;

Subscript[β, 0] = 0.0005;

Subscript[ψ, 0] = 0.001;

th1 = 
  Table[
    (Subscript[β, 0]*(Subscript[ψ, 0]*L) - Subscript[β, 1])/(Subscript[β, 1]*L), 
    {Subscript[β, 1], 0.00005, 0.0005, 0.00005}]

lam1 = 
  Table[
    (Subscript[β, 0]*(Subscript[ψ, 0]*L))/(Subscript[ψ, 1]*L + 1), 
    {Subscript[ψ, 1], 0.001, 0.01, 0.0008}]

EZZ = (th1*L + 1)/lam1

How can I make a contour plot of EZZ with the $th1$ and $lam1$ values? Both $th1$ and $lam1$ have different length and difficult to compute equal length values for them. Moreover, what should I need to use in $[th1,th1_{min},th1_{max}],[lam1,lam1_{min},lam1_{max}]$ because I dont know exactly the minimum and the maximum of the $th1$ and $lam1$, respectively, but wants to use the values computed in $th1$ and $lam1$.

$\endgroup$
  • $\begingroup$ Hi. Welcome to MathematicaSE. Please format your question as Mathematica code, and not as LaTeX. This way people will be able to copy-paste it and will be more inclined to help. $\endgroup$ – yohbs Jul 26 '15 at 13:45
  • $\begingroup$ Also, $\beta_1$ seems to be initialized in the second row, and then used as a variable in the fourth row. Is this intentional? $\endgroup$ – yohbs Jul 26 '15 at 13:47
  • $\begingroup$ @yohbs. The constants are probably β0 and Ψ0. This is a very bad post even for a first post. $\endgroup$ – m_goldberg Jul 26 '15 at 13:52
  • $\begingroup$ @m_goldberg I True, but I try to be hospitable nonetheless. Netiquette, like many other things, gets better with practice. $\endgroup$ – yohbs Jul 26 '15 at 13:57
  • $\begingroup$ How can I paste Mathematica code? Sorry for inconvenience but I am new user. $\endgroup$ – Ahmed Jul 26 '15 at 14:05
2
$\begingroup$

I am not sure I understand the question, but that has never stopped me before, so here goes:

L = 300;
Subscript[β, 0] = 0.0005;
Subscript[ψ, 0] = 0.001;

The following definitions contain modifications to the OP's code.

th1 = 
  Table[
    {Subscript[β, 1], 
     (Subscript[β, 0]*(Subscript[ψ, 0]*L) - Subscript[β, 1])/(Subscript[β, 1]*L)}, 
    {Subscript[β, 1], 0.00005, 0.0005, 0.00005}];
lam1 = 
  Table[
    {Subscript[ψ, 1], 
     (Subscript[β, 0]*(Subscript[ψ, 0]*L))/(Subscript[ψ, 1]*L + 1)}, 
    {Subscript[ψ, 1], 0.001, 0.01, 0.0008}];
ezz[u_, v_] := (th[u]*L + 1)/lm[v]

Now I create a contour plot of ezz:

th = Interpolation[th1];
lm = Interpolation[lam1];
uDomain = Join[{u}, th["Domain"][[1]]];
vDomain = Join[{v}, lm["Domain"][[1]]];
ContourPlot[ezz[u, v], Evaluate @ uDomain, Evaluate @ vDomain]

plot

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you very much m_goldberg. $\endgroup$ – Ahmed Jul 26 '15 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.