Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODE IN R ( Cubic splines) I am dealing with the syntax error Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y'

CODE IN R ( Cubic splines) I am dealing with the syntax error " Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ "

When I input this into my R console:

{ R code.......... } dy = CubicSpline(0:10, sin(0:10), cos(0), cos(10)) x = c() y = c() for (i in 0:100) { x = c(x, i*0.1) y = c(y, CubicSplineValue(i*0.1, 0:10, sin(0:10), dy)) } plot(sin,from = 0, to = 10) plot(x,y) # trying to plot cubic spline values but I get an error about lengths x and y differing

What am I doing wrong?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

2 The goals and tools of monetary policy.

Answered: 1 week ago

Question

How does selection differ from recruitment ?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago