how do i write this equation?

hello, how do i write this?
my code is
k = abs(x).*exp(-abs(x))

2 Comments

Your k (lowercase) is fine for that; now you just have to integrate that according to the methods of your assignment.
yup i got it thank you

Answers (1)

You can use 'int' function to perform integration as following:
syms x;
k = int(abs(x).*exp(-abs(x)),x,[-3,3]);

1 Comment

This Question was really the continuation of another Question, in which the assignment was to use a riemann sum to approximate the integral.

This question is closed.

Asked:

on 28 May 2020

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!