Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have to convert a program that i have in C++ to Mathlab. i have never worked with mathlab and have no idea how to

I have to convert a program that i have in C++ to Mathlab. i have never worked with mathlab and have no idea how to do it so if someone firmiliar with it can convert the code to work for me? the program is as followed:

#include

#include

using namespace std;

double deriv()

{

double y=0,e=2.71828,x;

double d=0.002;

cout<<"Original equation is y=(pow(e,(-2*x)))*sin(2*x)"<

cout<<"Y' for every 0.2 of x is:"<

for(x=0;x<=16;x+=0.2){

double yprime= (((pow(e,(-2*(x+d))))*sin(2*(x+d)))-((pow(e,(-2*x)))*sin(2*x)))/d;

cout<<"x = "<

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_2

Step: 3

blur-text-image_step3

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

List the goals of a persuasive message.

Answered: 1 week ago