<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: C++ custom function in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971266#M213515</link>
    <description>&lt;P&gt;Greetings thanks&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2024 05:08:33 GMT</pubDate>
    <dc:creator>DM_10631844</dc:creator>
    <dc:date>2024-09-13T05:08:33Z</dc:date>
    <item>
      <title>C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/961214#M212904</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1" style="width: 613px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/107769iEDEFFC9AB6106EC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2" style="width: 698px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/107767iB61634E8C3153927/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_8.png" alt="2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3" style="width: 763px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/107766i3F2F24B16F2A7B6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_9.png" alt="3" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;3&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4" style="width: 747px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/107768i127DD2A2050F7A86/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_10.png" alt="4" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2024 18:35:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/961214#M212904</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-07-14T18:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/961647#M212936</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Function to create a vector of given length made up of square of the number in DLL file "fc.dll".&amp;nbsp; &amp;nbsp;DLL file is in the zip file enclosed. Put the DLL file in CustomFunctions folder of Prime installation directory.&amp;nbsp; Changing "fc.c" to create a square matrix with values on the diagonal is trivial so not done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 726px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/107865i2C11734FBA808076/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// fc.c : Defines the entry point for the DLL application.


#include "MCADINCL.H"
#include &amp;lt;math.h&amp;gt;

#define  INTERRUPTED            1
#define  INSUFFICIENT_MEMORY    2
#define  MUST_BE_REAL           3
#define  NUMBER_OF_ERRORS       3   

    // table of error messages
    // if your function never returns an
    // error -- you do not need to create this
    // table
char* myErrorMessageTable[NUMBER_OF_ERRORS] =
{  "interrupted",
    "insufficient memory",
    "must be real"
};


// this code executes the multiplication
// see the information of MathcadUserFunction
// to find out more
LRESULT  ExpandRealScalar(COMPLEXARRAY* const Product,
    LPCCOMPLEXSCALAR Scalar)
{
    unsigned int row, col;

    // check that the scalar argument is real
    if ((Scalar-&amp;gt;imag != 0.0) || (Scalar-&amp;gt;real &amp;lt; 1.0))
        // if it is not, display "must be real" error message 
        // under the scalar argument( the 1st argument )
        return MAKELRESULT(MUST_BE_REAL, 1);

    // check that the array argument is real


    // allocate memory for the product
    if (!MathcadArrayAllocate(Product, floor(Scalar-&amp;gt;real), 1,
        TRUE,      // allocate memory for the real part 
        FALSE))    // do not allocate memory for 
        // the imaginary part

// if allocation is not successful
// return with the appropriate error code
return  INSUFFICIENT_MEMORY;


    // if all is well so far -- go ahead and 
    // perform the multiplication
    for (col = 0; col &amp;lt; Product-&amp;gt;cols; col++)
    {
        // check that a user has not tried to interrupt 
        // the calculation
        if (isUserInterrupted())
        {
            // if user has interrupted -- 
            // free the allocated memory
            MathcadArrayFree(Product);
            // and return with an appropriate error code
            return INTERRUPTED;
        }
        for (row = 0; row &amp;lt; Product-&amp;gt;rows; row++)
            Product-&amp;gt;hReal[col][row] =
            Scalar-&amp;gt;real * Scalar-&amp;gt;real;
    }
        // normal return
        return 0;
   }

    // fill out a FUNCTIONINFO structure with
    // the information needed for registering the
    // function with Mathcad
    FUNCTIONINFO fc =
    {
        // Name by which mathcad will recognize the function
        "fc",

        // description of "multiply" parameters to be used
        // by the Insert Function dialog box
        "a",

        // description of the function for the Insert Function dialog box       
        "returns the expansion of real scalar a",

        // pointer to the executible code
        // i.e. code that should be executed
        // when a user types in "fc(a)="
        (LPCFUNCTION)ExpandRealScalar,

        // multiply(a,M) returns a complex array
        COMPLEX_ARRAY,

        //fc(a) takes on one arguments
        1,

        // the first is a complex scalar
        { COMPLEX_SCALAR}
    };



    BOOL APIENTRY DllMain(HMODULE hModule,
        DWORD  ul_reason_for_call,
        LPVOID lpReserved
    )
    {
        switch (ul_reason_for_call)
        {
        case DLL_PROCESS_ATTACH:
            //
                   // DLL is attaching to the address space of 
                   // the current process.
                   //

            // register the error message table
            // Note, that if your function never returns
            // an error -- you do not need to 
            // register an error message table
            if (CreateUserErrorMessageTable(
                hModule, NUMBER_OF_ERRORS, myErrorMessageTable))
                // and if the errors register OK
                // go ahead and
                // register user function
                CreateUserFunction(hModule, &amp;amp;fc);
            break;



        case DLL_THREAD_ATTACH:
        case DLL_THREAD_DETACH:
        case DLL_PROCESS_DETACH:
            break;
        }
        return TRUE;
    }

#undef INTERRUPTED    
#undef INSUFFICIENT_MEMORY
#undef MUST_BE_REAL   
#undef NUMBER_OF_ERRORS
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Terry&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 16:15:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/961647#M212936</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-07-16T16:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962528#M212991</link>
      <description>&lt;P&gt;Hello &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/684477"&gt;@DM_10631844&lt;/a&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you have a &lt;A href="https://community.ptc.com/t5/Mathcad/C-custom-function/m-p/961647#M212936" target="_blank"&gt;response &lt;/A&gt;from a community member. If it helped you solve your question please mark the reply as the Accepted Solution.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Vivek N.&lt;BR /&gt;Community Moderation Team.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 12:02:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962528#M212991</guid>
      <dc:creator>vnamboodheri</dc:creator>
      <dc:date>2024-07-22T12:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962686#M212999</link>
      <description>&lt;P&gt;Perfect thank you I have a question &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/269418"&gt;@terryhendicott&lt;/a&gt; you did it by command promp or by the visual studio program, I comment that I still do not understand how it would be to try to compile it by the visual studio program, by command it works well but I think that by program I do not add well the references etc if or I start from 0 can you indicate how it would be without the command promp thank you greetings&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 00:48:42 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962686#M212999</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-07-23T00:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962692#M213001</link>
      <description>&lt;P&gt;I compile by Borland C++ Builder 12 - paid for or Visual Studio Community 2022 - free.&amp;nbsp; Both use an IDE to make compilation easier.&amp;nbsp; I have used these so much have forgotten how to use the command line.&amp;nbsp; Using&amp;nbsp; a "*c" file forces c compilation not c++.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Four things to set are:&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp; &amp;nbsp; Directory for include of&amp;nbsp;&amp;nbsp;C:\Program Files\PTC\Mathcad Prime 10.0.0.0\Custom Functions&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp; &amp;nbsp; #include "MCADINCL.H" in the source file *.c for the dll&lt;/P&gt;
&lt;P&gt;3)&amp;nbsp; &amp;nbsp; Directory for library&amp;nbsp;C:\Program Files\PTC\Mathcad Prime 10.0.0.0\Custom Functions&lt;/P&gt;
&lt;P&gt;4)&amp;nbsp; &amp;nbsp; Inclusiion of the library&amp;nbsp;mcaduser.lib&lt;/P&gt;
&lt;P&gt;5)&amp;nbsp; &amp;nbsp; I turn off wide character strings (optional)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1,3,4,5 are set by options in Project Properties in the IDE (&lt;STRONG&gt;I&lt;/STRONG&gt;ntegrated &lt;STRONG&gt;D&lt;/STRONG&gt;evelopment &lt;STRONG&gt;E&lt;/STRONG&gt;nvironment)&lt;/P&gt;
&lt;P&gt;2 is in the source file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Terry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 01:54:48 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962692#M213001</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-07-23T01:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962698#M213002</link>
      <description>&lt;P&gt;This is a project that I have but I would like to compile it in visual studio because with commands if I understand there are some of the steps you mention that have not worked for me&lt;BR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/269418"&gt;@terryhendicott&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DM_10631844_0-1721703819495.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108102iE0FC59B96A78542C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DM_10631844_0-1721703819495.png" alt="DM_10631844_0-1721703819495.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DM_10631844_1-1721703827454.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108103i51BD60458034358D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DM_10631844_1-1721703827454.png" alt="DM_10631844_1-1721703827454.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 03:04:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/962698#M213002</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-07-23T03:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/963025#M213011</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Prime is a 64 bit program so needs 64 bit DLL's&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 504px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108176i9DED0B2C3FAD7C6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Need to compile as c code so highlight file in solution explorer and right click and select rename file option&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.jpg" style="width: 305px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108179i7A59E4CC92EC5866/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.jpg" alt="Capture4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get rid of precompiled headers&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 779px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108187iB3895288FED75F59/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to explicitly call up the library to use it&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 778px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108188iC302BDD522599EB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also set the include and library directories to the original location of the header and library files.&amp;nbsp; It is the same directory.&amp;nbsp; I see you copied them into the solution directory. so no real need to set the directories&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 07:40:59 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/963025#M213011</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-07-24T07:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/963028#M213012</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You change the properties like precompiled headers from the properties dialog launched like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture5.JPG" style="width: 622px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/108190i2111239DEC3DFB9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture5.JPG" alt="Capture5.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 07:50:01 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/963028#M213012</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-07-24T07:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971001#M213497</link>
      <description>&lt;P&gt;Has the function worked? What are the input variables of geometriavolcar as you compiled it please show in mathcad the example as it is solved&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DM_10631844_0-1726097839382.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/110354i63FB2B3B9A3CDD2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DM_10631844_0-1726097839382.png" alt="DM_10631844_0-1726097839382.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Al entrar me aparece esto en el archivo log Exception data:&lt;BR /&gt;System.AccessViolationException: Intento de leer o escribir en la memoria protegida. A menudo, esto indica que hay otra memoria dañada.&lt;BR /&gt;en Efi.User.Function.Invoke4(Object arg1, Object arg2, Object arg3, Object arg4)&lt;BR /&gt;en $$b_706914c0(Object[] , Object )&lt;BR /&gt;en Mpl.Run.UnaryDelegateFunction.app[R,A](R&amp;amp; r, A aa)&lt;BR /&gt;en Mpl.Run.Function.Call_1[R,A](A aa)&lt;BR /&gt;en McdTranslator.values.op_eval(Object )&lt;BR /&gt;en $$a_70691364(Object[] , Object )&lt;BR /&gt;en Mpl.Run.UnaryDelegateFunction.app[R,A](R&amp;amp; r, A aa)&lt;BR /&gt;en Mpl.Run.Function.Call_1[R,A](A aa)&lt;BR /&gt;en McdTranslator.values.op_eval(Object )&lt;BR /&gt;en Update(Object[] , Object[] , Object[] )&lt;BR /&gt;en depman.SafeRun.Run()&lt;BR /&gt;en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;en System.Threading.ThreadHelper.ThreadStart()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 23:41:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971001#M213497</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-09-11T23:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971038#M213501</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Function fc a c language function in this thread works OK.&amp;nbsp; It was&amp;nbsp; written by me so I can debug it easily.&lt;/P&gt;
&lt;P&gt;Function geometria_volcar was written by someone else so it would take a long time to debug as it does not work with inputs as per your example.&lt;/P&gt;
&lt;P&gt;Start a new thread as this one is months old.&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Terry&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 06:53:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971038#M213501</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-09-12T06:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971266#M213515</link>
      <description>&lt;P&gt;Greetings thanks&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 05:08:33 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/971266#M213515</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-09-13T05:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/973825#M213859</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Function now works.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 976px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/111229i6E0D36AAEB9271CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 21:37:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/973825#M213859</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-09-25T21:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/973828#M213860</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Back to your original post.&amp;nbsp; Swap the indices into the matrix.&amp;nbsp; Mathcad stores arrays in column major format.&lt;/P&gt;
&lt;P&gt;No array[ row ][ col ]&lt;/P&gt;
&lt;P&gt;Yes array[ col ][ row ]&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 789px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/111230i64482B36F0F8A6B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 22:15:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/973828#M213860</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2024-09-25T22:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/981321#M214739</link>
      <description>&lt;P&gt;Great, thank you very much. Now I have another question. In the case of doing operations with sqrt, I had to use Newton Rapson's method. Is there another way? Could you tell me what the error is here for which it doesn't work for me? What happens is that this error always appears. I have not managed to make a good code, and also when I make a mistake, something I am not doing right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DM_10631844_0-1730482735886.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/113449i27A90D7C84A827F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DM_10631844_0-1730482735886.png" alt="DM_10631844_0-1730482735886.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 17:40:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/981321#M214739</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-11-01T17:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/981333#M214741</link>
      <description>&lt;P&gt;The idea was to pass the code from matlab to mathcad through the custom function c&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DM_10631844_0-1730483007904.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/113452i0DE5A74A8A7C8DD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DM_10631844_0-1730483007904.png" alt="DM_10631844_0-1730483007904.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;In the file I put the following functions, is it possible to do the same with units or only that way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 18:30:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/981333#M214741</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-11-01T18:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: C++ custom function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/981337#M214742</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DM_10631844_0-1730485991066.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/113457i86B1DFB26B413C7C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DM_10631844_0-1730485991066.png" alt="DM_10631844_0-1730485991066.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How would this example be for a custom function with c++?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 18:35:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/C-custom-function/m-p/981337#M214742</guid>
      <dc:creator>DM_10631844</dc:creator>
      <dc:date>2024-11-01T18:35:08Z</dc:date>
    </item>
  </channel>
</rss>

