I want to solve the following integral: z = 15; syms x1 x2 x3 x4 f f = ( x1 + x2 + x3 + max(0,x3-x4) )*(exp(-lambda*x4)*power(lambda,Q)); result = int(int(int(int(f,'x1',0,x2),'x2',0,x3),'x3',0,x4),'x4',0,z);
But i have this error: Undefined function 'max' for input arguments of type 'sym'.
Could you please help me...

Réponses (1)

Massimo Zanetti
Massimo Zanetti le 7 Oct 2016
Modifié(e) : Massimo Zanetti le 7 Oct 2016

3 votes

To get max of symbolic variables x,y try this:
max(double([x,y]))

1 commentaire

saeed poormoaied
saeed poormoaied le 8 Oct 2016
Hi Zanetti,
Unfortunately, It does not work. I copy a simple code here:
clear all close all clc
lambda = 11; Q = 4; z = 15; L = 10; r = 1;
syms x1 x2 x3 x4 f = ( x1 + x2 + x3 + max(double([0,x3-x4])) )*(exp(-lambda*x4)*power(lambda,Q)); result = int(int(int(int(f,'x1',0,x2),'x2',0,x3),'x3',0,x4),'x4',0,z);

Connectez-vous pour commenter.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by