User Profile

Collapse

Profile Sidebar

Collapse
redsox595
redsox595
Last Activity: Aug 11 '14, 12:03 PM
Joined: Aug 10 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • redsox595
    replied to Matlab's polyval and polyder in C++
    in C
    I have figured out the polyval function. Do you have any ideas as to how I could write a function to differentiate a polynomial of the form
    p(x) = p(1) * x^(n) + p(2) * x^(n-1) + p(3)*x^(n-2) + ... + p(n)*x + p(n-1)
    See more | Go to post

    Leave a comment:


  • redsox595
    replied to Matlab's polyval and polyder in C++
    in C
    How could I fix it? I am new to C++ and I want px to be the value of the polynomial when evaluated at x.
    See more | Go to post

    Leave a comment:


  • redsox595
    started a topic Matlab's polyval and polyder in C++
    in C

    Matlab's polyval and polyder in C++

    Hello, I am trying to write functions that behave exactly as the polyval and polymer functions do in Matlab. My code is outputting the wrong solution and I am not sure where my errors are. Thank you

    Code:
    #include <iostream>
    #include <cmath>
    using namespace std;
    
    float polyval(float*, int, float);
    void polyder(float*, int, float*);
    
    int main() {
        
        int n;
    ...
    See more | Go to post
No activity results to display
Show More
Working...