필터 지우기
필터 지우기

Problem solving integral?

조회 수: 1 (최근 30일)
Sasi
Sasi 2012년 5월 8일
Hi
I have a problem calculating these codes:
syms x B C K
syms D S positive
f=2^(-log2(1/B)*((abs(x-2)/C)^D));
g=2*(2^(-(1+(K*((x-2)/S))^(-1/K);
h=(f-g)^2;
H=int(h)
actually I get the answer but the result is a piecewise function. I would like to calculate the integral for x<2 but I donno how to do it and thats why I get that answer. I would appreciate any helps. Regards Sasi
  댓글 수: 1
Alexander
Alexander 2012년 5월 8일
There seems to be a problem with the code. I do get this error message:
g=2*(2^(-(1+(K*((x-2)/S))^(-1/K);
|
Error: Unbalanced or unexpected parenthesis or bracket.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2012년 5월 8일
Use assumptions. A nicer interface for assumptions was added in R2012a; otherwise you will need to use feval()

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by