Skip navigation
1606 Views 14 Replies Latest reply: Feb 16, 2012 4:28 AM by Lilli RSS
Lilli Bronze 36 posts since
Jan 31, 2007
Currently Being Moderated

Feb 14, 2012 8:51 AM

ARGH! Where is my mistake

Dear everybody!

 

You find enclosed my MathCAD file.

 

My equations depend of THETA, I know by mesure the pressure following THETA.

 

Why FI"(THETA) isn't a function?

Attachments:
  • wayne Gold 440 posts since
    Apr 22, 2010
    Currently Being Moderated
    Feb 14, 2012 9:34 AM (in response to Lilli)
    Re: ARGH! Where is my mistake

    Are the values of Theta in the excell table in degrees?
    If so then assign the degree unit to theta (  theta:=theta*deg) and drop the degree assignments in the functions.

    Mathcad will convert to radians internally, and do computations in radians.

     

    It's a little confusing using angular velocity in radians/s and funcitons that have theta in degrees combined with functions with theta in radians.

  • FredKohlhepp Platinum 1,709 posts since
    Nov 28, 2006
    Currently Being Moderated
    Feb 14, 2012 9:36 AM (in response to Lilli)
    Re: ARGH! Where is my mistake

    The sheet you posted has no data for theta or P(theta); the readfile structuresdon't store the data.  As soon as I create values for theta, all the functions develop values.

    Attachments:
    • wayne Gold 440 posts since
      Apr 22, 2010
      Currently Being Moderated
      Feb 15, 2012 6:54 AM (in response to Lilli)
      Re: ARGH! Where is my mistake

      You need to vectorize some of the equations.

       

      Mathcad will automatically vectroize, sometimes.  I've see situations where Mathcad appeared to vectorize automatically, because it gave multiple results. But if you then vectorize, the answer is different (and correct).

       

      Some of you equations that don't produce multiple results just need to be vectorized, but others should be checked to see if the result when vectorized is the same.

       

      You could also put Theta=0..rows()Theta  and P=0..rows(P) at the beginning and it will do the same thing (I did not try though).

       

      It also looks like you need to assign units to P,  P=P*psi, or whatever.

      • MikeArmstrong Diamond 4,383 posts since
        Dec 3, 2008
        Currently Being Moderated
        Feb 15, 2012 7:20 AM (in response to wayne)
        Re: ARGH! Where is my mistake

        Mathcad will automatically vectroize, sometimes.  I've see situations where Mathcad appeared to vectorize automatically, because it gave multiple results. But if you then vectorize, the answer is different (and correct).

        It's a very dangerous situation. I had that happen to me recently. It tends to happen when you have two vectors with one equation.

         

        Mike

        • MikeArmstrong Diamond 4,383 posts since
          Dec 3, 2008
          Currently Being Moderated
          Feb 15, 2012 7:26 AM (in response to MikeArmstrong)
          Re: ARGH! Where is my mistake

          A simple example of what Wayne was talking about.

           

          Clipboard01.jpg

           

           

          Mike

            • MikeArmstrong Diamond 4,383 posts since
              Dec 3, 2008
              Currently Being Moderated
              Feb 15, 2012 7:47 AM (in response to Lilli)
              Re: ARGH! Where is my mistake

              Sorry I have come late into this thread. You haven't defined theta or P in your sheet. Firstly you either have to define that or make each function dependant of theta.

               

              I cannot see where in your sheet P is being calculated and therefore cannot see which value of theta relates to which pressure.

               

              Mike

                • wayne Gold 440 posts since
                  Apr 22, 2010
                  Currently Being Moderated
                  Feb 15, 2012 9:51 AM (in response to Lilli)
                  Re: ARGH! Where is my mistake

                  Lilli:

                   

                  See attached;  For Theta, use a vector, not a range variable
                                        You imported 2 columns from Excel, you only want the second column.

                                        A few of places you still had the degree unit in the function
                                        I vecotrized everything, don't know if they all needed to be though.

                   

                                        I made no attempt the check the results.

                   

                  Wayne

                  Attachments:
                    • FredKohlhepp Platinum 1,709 posts since
                      Nov 28, 2006
                      Currently Being Moderated
                      Feb 16, 2012 4:10 AM (in response to Lilli)
                      Re: ARGH! Where is my mistake

                      Actually, if you import both columns your sheet will work as written.

                       

                      One of the things Mathcad can do isfit functions to data.  Before I realized that importingg the whole file solved your problem, I was trying to develop P as a function of theta.  That would allow you to use functions instead of vectors.

                      Attachments:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 3 points
  • Helpful Answers - 1 points