Write a Matlab function program der4x y which given the valu



Write a Matlab function program der4(x, y) which, given the value of a function at five base points (x, y), uses a fourth degree interpolating polynomial so evaluate the derivative of the function at the central base point. Use the Matlab utilities polyfit, polyder and polyval to do this. Use this function program to solve the following problem. Calculate the enthalpy of vaporization of water at 50^degree C to at least 5 significant figures from the Clapeyron equation

Solution

package com.edu4java.samplegame; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import javax.swing.JFrame; import javax.swing.JPanel; @SuppressWarnings(\"serial\") public class Game extends JPanel { int x = 0; int y = 0; private void moveBall() { x = x + 1; y = y + 1; } @Override public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.fillOval(x, y, 30, 30); } public static void main(String[] args) throws InterruptedException { JFrame frame = new JFrame(\"Sample Frame\"); Game game = new Game(); frame.add(game); frame.setSize(300, 400); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); while (true) { game.moveBall(); game.repaint(); Thread.sleep(10); } } }
 Write a Matlab function program der4(x, y) which, given the value of a function at five base points (x, y), uses a fourth degree interpolating polynomial so ev

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site