Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!