Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8682555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:48:31+00:00 2026-06-12T21:48:31+00:00

I am new to matlab and do not know how to make a table

  • 0

I am new to matlab and do not know how to make a table that compares the values of this polynomial function with w=1/(x^2+1)

my attempt

 x= [-5,-3,-1, 1, 3,5]

 x =

-5    -3    -1     1     3     5

y= [0.0385, 0.10, 0.50, 0.50, 0.10, 0.0385]

y =

0.0385    0.1000    0.5000    0.5000    0.1000    0.0385

yp=[0.0148,0.06,0.50,-0.50,-0.6,-0.0148]

yp =

0.0148    0.0600    0.5000   -0.5000   -0.6000   -0.0148

hp = hermite (x, y, yp )

hp =

-0.0000   -0.0000    0.0001    0.0004   -0.0011   -0.0100    0.0072    0.0969   -0.0113   -0.4156    0.0051    0.8282

Now it only remains to compare in a table the values of hp with w.

Could someone please help me?

Thanks for your help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:48:32+00:00Added an answer on June 12, 2026 at 9:48 pm

    I see no w in your question, but in general the expression

    hp == w
    

    will, if the vectors have the same length, return a vector of 0s and 1s, of that length, representing the cases where the two vectors match (1) or don’t match (0). In passing, note that comparison for equality of floating-point numbers is fraught with ‘issues’ and you might be better evaluating:

    abs(hp-w) < 10^-6
    

    replacing 10^-6 by your preferred tolerance.

    Given your definition for w you should be able to write

    hp == 1/(x.^2+1)
    

    Note the use of the elementwise squaring operator .^, which returns a vector of the same length as x with each element the square of the corresponding element in x. Of course, the expression

    hp - 1./(x.^2+1)
    

    will return a vector of the differences, which might be what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Matlab and I'm trying to write custom function in matlab that
I'm completely new to MATLAB and I want to know what my options are
Hello I am new to MATLAB , I wanted to know how can I
Apologies if this is a stupid question, I'm relatively new to Matlab. I've got
I am new to Python (coming from MATLAB) and was beginning to learn that
In MATLAB, when you click File -> New -> Function M-File, you get a
Anyone out there used MATLAB's javaObject() function with a JAR file that uses JNI?
Sorry if this is stupid question, but I'm new to MATLAB. I have a
I am new to image analysis. Do you know how to binarize this image
still fairly new to matlab, picked up this data analysis code from someone and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.