curvature of mode shape

17 views (last 30 days)
Shohreh Alaedini
Shohreh Alaedini on 13 Nov 2020
Commented: Shohreh Alaedini on 18 Nov 2020
Can you please help me how to write this code?
I have x=[...]
y=[....]
i=size(x)
and need to calculate r[...]=y(i+1)+y(i-1)-y(i)/h^2
h = x(i)-x(i-1)

Accepted Answer

KSSV
KSSV on 13 Nov 2020
Already you have written what you want and it should be bit placed properly. Let y be your array.
n = length(y) ;
r = zeros(n-2,1) ;
for i = 2:n-1
h = x(i)-x(i-1) ;
r(i) = (y(i+1)+y(i-1)-y(i))/h^2
end

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!