not able to solve the integration function

1 Ansicht (letzte 30 Tage)
Kundan Prasad
Kundan Prasad am 16 Dez. 2021
Kommentiert: Kundan Prasad am 16 Dez. 2021
Dear Sir/Madam,
I am not able to solve the given integration function. The screenshot of given is attached and the code is given below
Thank you
for j=1:100
x(j)=linspace(0,0.025,101);
R(j)=linspace(0,0.4,101);
f=0.025;
syms x
b(j)= int(R(j)-sqrt(R(j).^2-x(j).^2),0, f);
c(j)=sqrt((1/f)*b(j));
end
  6 Kommentare
Kundan Prasad
Kundan Prasad am 16 Dez. 2021
yes sir
for given R=0.4, f=0 & 0.025, x=0:0.001:0.025,
what will be the value of σ for each x
Kundan Prasad
Kundan Prasad am 16 Dez. 2021
here f=0.025

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Jan
Jan am 16 Dez. 2021
This cannot work:
x(j) = linspace(0,0.025,101);
On the left is a scalar and on the right a vector with 101 elements.
Seeing only the invalid code does not clarify its intention. What is the purpose of the loop?
  2 Kommentare
Kundan Prasad
Kundan Prasad am 16 Dez. 2021
what need to be change in code. Please clarify??
Thank you
Jan
Jan am 16 Dez. 2021
I cannot fix the code such that it does, what you want, as long as you do not clarify what you want to achieve. I ask again: What is the purpose of the loop? I'd expect RT to be a constand and x to be a symbolic variable. Then there is no need for a loop.

Melden Sie sich an, um zu kommentieren.


Tesfaye Girma
Tesfaye Girma am 16 Dez. 2021
indeces should have to match in both side and be compatable as well

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by