Unsure why Plot3D is empty? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2












$begingroup$


I don't understand why my 3D Plot is empty so was looking for some advice. I have several functions defined, one of which is used in Plot3D, as seen below.



b = Sqrt[0.75];
L = b;
lambda = 1.11;
pi = 3.141592653589793;

Qn[n_] := (
Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];
)

V0[y_] := (
(Exp (b/lambda)/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
Exp[-(L - y + b/2)/lambda]);
)

V[x_, y_] := (
b*pi*(V0[y] + Sum[Cos[2*pi*i*x]*((Exp[-L*Qn[i]/(2*b)]*
Cosh ((y - L/2)*(Qn[i]/b))/(Qn[i]*
Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i, 3]);
)

Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


and Mathematica just outputs an empty plot. Thanks in advance for any help, hopefully I have just missed something simple.










share|improve this question









$endgroup$



closed as off-topic by Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg Feb 12 at 17:42


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    $begingroup$
    What are the values for wdth and hght?
    $endgroup$
    – zhk
    Feb 12 at 14:22










  • $begingroup$
    Minor comment: parentheses around your functions are not wrong, but they are not necessary. That is, you can write Qn[n_] :=Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]; rather than Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];), for example.
    $endgroup$
    – Alexei Boulbitch
    Feb 12 at 14:39
















2












$begingroup$


I don't understand why my 3D Plot is empty so was looking for some advice. I have several functions defined, one of which is used in Plot3D, as seen below.



b = Sqrt[0.75];
L = b;
lambda = 1.11;
pi = 3.141592653589793;

Qn[n_] := (
Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];
)

V0[y_] := (
(Exp (b/lambda)/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
Exp[-(L - y + b/2)/lambda]);
)

V[x_, y_] := (
b*pi*(V0[y] + Sum[Cos[2*pi*i*x]*((Exp[-L*Qn[i]/(2*b)]*
Cosh ((y - L/2)*(Qn[i]/b))/(Qn[i]*
Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i, 3]);
)

Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


and Mathematica just outputs an empty plot. Thanks in advance for any help, hopefully I have just missed something simple.










share|improve this question









$endgroup$



closed as off-topic by Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg Feb 12 at 17:42


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    $begingroup$
    What are the values for wdth and hght?
    $endgroup$
    – zhk
    Feb 12 at 14:22










  • $begingroup$
    Minor comment: parentheses around your functions are not wrong, but they are not necessary. That is, you can write Qn[n_] :=Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]; rather than Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];), for example.
    $endgroup$
    – Alexei Boulbitch
    Feb 12 at 14:39














2












2








2





$begingroup$


I don't understand why my 3D Plot is empty so was looking for some advice. I have several functions defined, one of which is used in Plot3D, as seen below.



b = Sqrt[0.75];
L = b;
lambda = 1.11;
pi = 3.141592653589793;

Qn[n_] := (
Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];
)

V0[y_] := (
(Exp (b/lambda)/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
Exp[-(L - y + b/2)/lambda]);
)

V[x_, y_] := (
b*pi*(V0[y] + Sum[Cos[2*pi*i*x]*((Exp[-L*Qn[i]/(2*b)]*
Cosh ((y - L/2)*(Qn[i]/b))/(Qn[i]*
Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i, 3]);
)

Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


and Mathematica just outputs an empty plot. Thanks in advance for any help, hopefully I have just missed something simple.










share|improve this question









$endgroup$




I don't understand why my 3D Plot is empty so was looking for some advice. I have several functions defined, one of which is used in Plot3D, as seen below.



b = Sqrt[0.75];
L = b;
lambda = 1.11;
pi = 3.141592653589793;

Qn[n_] := (
Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];
)

V0[y_] := (
(Exp (b/lambda)/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
Exp[-(L - y + b/2)/lambda]);
)

V[x_, y_] := (
b*pi*(V0[y] + Sum[Cos[2*pi*i*x]*((Exp[-L*Qn[i]/(2*b)]*
Cosh ((y - L/2)*(Qn[i]/b))/(Qn[i]*
Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i, 3]);
)

Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


and Mathematica just outputs an empty plot. Thanks in advance for any help, hopefully I have just missed something simple.







plotting






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 12 at 14:20









Nathan MayesNathan Mayes

141




141




closed as off-topic by Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg Feb 12 at 17:42


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg Feb 12 at 17:42


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Henrik Schumacher, zhk, Bob Hanlon, MarcoB, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 2




    $begingroup$
    What are the values for wdth and hght?
    $endgroup$
    – zhk
    Feb 12 at 14:22










  • $begingroup$
    Minor comment: parentheses around your functions are not wrong, but they are not necessary. That is, you can write Qn[n_] :=Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]; rather than Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];), for example.
    $endgroup$
    – Alexei Boulbitch
    Feb 12 at 14:39













  • 2




    $begingroup$
    What are the values for wdth and hght?
    $endgroup$
    – zhk
    Feb 12 at 14:22










  • $begingroup$
    Minor comment: parentheses around your functions are not wrong, but they are not necessary. That is, you can write Qn[n_] :=Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]; rather than Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];), for example.
    $endgroup$
    – Alexei Boulbitch
    Feb 12 at 14:39








2




2




$begingroup$
What are the values for wdth and hght?
$endgroup$
– zhk
Feb 12 at 14:22




$begingroup$
What are the values for wdth and hght?
$endgroup$
– zhk
Feb 12 at 14:22












$begingroup$
Minor comment: parentheses around your functions are not wrong, but they are not necessary. That is, you can write Qn[n_] :=Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]; rather than Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];), for example.
$endgroup$
– Alexei Boulbitch
Feb 12 at 14:39





$begingroup$
Minor comment: parentheses around your functions are not wrong, but they are not necessary. That is, you can write Qn[n_] :=Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]; rather than Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2];), for example.
$endgroup$
– Alexei Boulbitch
Feb 12 at 14:39











1 Answer
1






active

oldest

votes


















5












$begingroup$

wdth = 1;

hght = 1;

b = Sqrt[0.75];
L = b;
lambda = 1.11;
pi = 3.141592653589793;

Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]);

V0[y_] := ((Exp [b/lambda]/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
Exp[-(L - y + b/2)/lambda]));

V[x_, y_] := (b*
pi*(V0[y] +
Sum[Cos[2*pi*i*
x]*((Exp[-L*Qn[i]/(2*b)]*
Cosh [(y - L/2)*(Qn[i]/b)]/(Qn[i]*
Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i,
3]));

Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


enter image description here



  1. Use Cos not Cos()

  2. Use Exp not Exp()

  3. Do not use ) after the semicolon use it before.

  4. The best way to debunk your code is to try give a numerical value to your functions, i.e., Qn[1], V0[1], V[1,1]





share|improve this answer









$endgroup$



















    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5












    $begingroup$

    wdth = 1;

    hght = 1;

    b = Sqrt[0.75];
    L = b;
    lambda = 1.11;
    pi = 3.141592653589793;

    Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]);

    V0[y_] := ((Exp [b/lambda]/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
    Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
    Exp[-(L - y + b/2)/lambda]));

    V[x_, y_] := (b*
    pi*(V0[y] +
    Sum[Cos[2*pi*i*
    x]*((Exp[-L*Qn[i]/(2*b)]*
    Cosh [(y - L/2)*(Qn[i]/b)]/(Qn[i]*
    Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i,
    3]));

    Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


    enter image description here



    1. Use Cos not Cos()

    2. Use Exp not Exp()

    3. Do not use ) after the semicolon use it before.

    4. The best way to debunk your code is to try give a numerical value to your functions, i.e., Qn[1], V0[1], V[1,1]





    share|improve this answer









    $endgroup$

















      5












      $begingroup$

      wdth = 1;

      hght = 1;

      b = Sqrt[0.75];
      L = b;
      lambda = 1.11;
      pi = 3.141592653589793;

      Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]);

      V0[y_] := ((Exp [b/lambda]/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
      Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
      Exp[-(L - y + b/2)/lambda]));

      V[x_, y_] := (b*
      pi*(V0[y] +
      Sum[Cos[2*pi*i*
      x]*((Exp[-L*Qn[i]/(2*b)]*
      Cosh [(y - L/2)*(Qn[i]/b)]/(Qn[i]*
      Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i,
      3]));

      Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


      enter image description here



      1. Use Cos not Cos()

      2. Use Exp not Exp()

      3. Do not use ) after the semicolon use it before.

      4. The best way to debunk your code is to try give a numerical value to your functions, i.e., Qn[1], V0[1], V[1,1]





      share|improve this answer









      $endgroup$















        5












        5








        5





        $begingroup$

        wdth = 1;

        hght = 1;

        b = Sqrt[0.75];
        L = b;
        lambda = 1.11;
        pi = 3.141592653589793;

        Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]);

        V0[y_] := ((Exp [b/lambda]/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
        Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
        Exp[-(L - y + b/2)/lambda]));

        V[x_, y_] := (b*
        pi*(V0[y] +
        Sum[Cos[2*pi*i*
        x]*((Exp[-L*Qn[i]/(2*b)]*
        Cosh [(y - L/2)*(Qn[i]/b)]/(Qn[i]*
        Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i,
        3]));

        Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


        enter image description here



        1. Use Cos not Cos()

        2. Use Exp not Exp()

        3. Do not use ) after the semicolon use it before.

        4. The best way to debunk your code is to try give a numerical value to your functions, i.e., Qn[1], V0[1], V[1,1]





        share|improve this answer









        $endgroup$



        wdth = 1;

        hght = 1;

        b = Sqrt[0.75];
        L = b;
        lambda = 1.11;
        pi = 3.141592653589793;

        Qn[n_] := (Sqrt[(b/lambda)^2 + (2*pi*n*b)^2]);

        V0[y_] := ((Exp [b/lambda]/(Exp[b/lambda] - 1))*(Exp[-y/lambda] +
        Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
        Exp[-(L - y + b/2)/lambda]));

        V[x_, y_] := (b*
        pi*(V0[y] +
        Sum[Cos[2*pi*i*
        x]*((Exp[-L*Qn[i]/(2*b)]*
        Cosh [(y - L/2)*(Qn[i]/b)]/(Qn[i]*
        Sinh[Qn[i]/2]))*(1 + (-1)^(i)*Exp[-Qn[i]/2])), i,
        3]));

        Plot3D[V[x, y], x, 0, wdth, y, -hght, hght]


        enter image description here



        1. Use Cos not Cos()

        2. Use Exp not Exp()

        3. Do not use ) after the semicolon use it before.

        4. The best way to debunk your code is to try give a numerical value to your functions, i.e., Qn[1], V0[1], V[1,1]






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 12 at 14:28









        zhkzhk

        9,69911433




        9,69911433












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay