want to index as shown in figure
1 view (last 30 days)
Show older comments
HELLO, WANT THIS TYPE OF INDEXING.... THANKS IN ADV
clc
clear all
close all
N=7;
b=0.003;
R=2;
hmin=0.02e-3;
x=linspace(-b/2, b/2, N);
delx= x(2)-x(1);
display(x);
for I=1:N
H(I)=hmin+(x(I)^2)/(2*R);
end
for I=2:N-1
Z(I)=(((H(I+1)+H(I))*0.5)^3)+(((H(I)+H(I-1))*0.5)^3);
A(I)=1;
B(I)=-((((H(I)+H(I-1))*0.5)^3)/(Z(I)));
C(I)=-((((H(I+1)+H(I))*0.5)^3)/(Z(I)));
D(I)=-(2.6527e-004*(H(I+1)-H(I-1)))/(Z(I));
end
A2=[A(2:N-1)];
B2=[B(3:N-1)];
C2=[C(2:N-2)];
X=diag(A2)+diag(C2,1)+diag(B2,-1);
P1=4e6;
P2=0;
D2=[D(2:N-1)];
Y=[D(2)-(B(2)*P1);D(3);D(4);D(5);D(N-1)-(C(N-1)*P2)];
P = (inv(X))*Y;
display(P);
P3=[P(2:N-1)];
display(P3);
Z=[P1;P(2:N-1);P2];
plot(x,Z);
0 Comments
Answers (0)
See Also
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!