Could someone please direct me to a good book/article that describes how to use a coarse and fine spatial mesh with the numerical method of characteristics?
Thank you.
Kate
Well k1 is a vector with entries 1 to 3, k1=(1 2 3).
m is the 3 x 3 identity matrix.
For each j, I want to do the sum from k= 1 to 3
sum((k+k1(j)).*m(k,j)) = (1+k1(j))*m(1,j) + (2+k1(j))*m(2,j) + (3+k1(j))*m(3,j)
Then I want to plot the values of the sum for each j.
It doesn't make a difference which order you do it in. You can see if you type the following into matlab:
syms k
syms j
symsum(symsum(k^j,j,0,4),k,1,3)
or,
symsum(symsum(k^j,k,1,3),j,0,4)
the answer is 157 either way.
Hi everyone,
Could someone please tell me how to get MATLAB to do the following seemingly simple task..
j=1:3;
k1=1:3;
m=eye(3)
plot(j,symsum((p8+k1(j)).*m(p8,j),p8,1,3))
or,
k=1:3;
plot(j,sum((k+k1(j)).*m(k,j)))
Thanks for any suggestions,
Kate