Hi guys, I'm trying to get the summation over for loop statement for A(i,j). First, I'm not sure if i'm doing the whole summation right, secondly, I get a subscripted assignment dimension mismatch error, but I quiet don't understand why. Thanks for the help.
clear all close all
%Crack length b=10; % # of elements on the line N=10; % Poisson's ratio v=0.1; %Pressure PR=1; %Shear modulus G=1000; %BE Length a=b/N;
for i=1:N X(i)=x(2*i-1)+a/2; end
for i=1:N for j=1:N XX(i,j)=xp(i)-xp(j); end XX(i,i)=a/N^2; end
K=1; A=ones(N,N); for i=1:N for j=1:N A(i,j)=B*(XX(i,j).^2-(a1).^2) end K=K+1; end