error in integral equation

조회 수: 1 (최근 30일)
nikhil
nikhil 2020년 3월 1일
댓글: nikhil 2020년 3월 2일
clc
clear
% t = -(r^3)*sqrt((R)^2-(ro)^2);
% k= sqrt(((R)^6*(r^2-ro^2))-((r)^6*(R^2-ro^2)));
% z = t/k;
R = 65; ro = 17.5;
syms r
func1 = @(r) PI*((-(r^3).*sqrt((R)^2-(ro)^2))/(sqrt(((R)^6.*(r^2-ro^2))-((x)^6*(R^2-ro^2)))))*r.^2;
j = integral(func1, 65,17.5);
Hi all,
I am trying to solve this code in matlab, but i am getting an error as
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in performance_factor_optimal (line 9)
j = integral(func1, 65,17.5);
any suggestions thanks in advance

채택된 답변

Walter Roberson
Walter Roberson 2020년 3월 1일
Each place that you have r^ change that to r.^
Change / to ./
Change * to .*
Also we need to see the source code for the function x that you are calling without parameters.
  댓글 수: 1
nikhil
nikhil 2020년 3월 2일
Thanks for your time @walter roberson
Now code is working perfectly

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by