I tried to loop over N and get four vectors out of the function. N is the number of points and the function evaluates an estimate for the derivatives at those points. So if there are N=11 points it will give me a vector of 11 derivative estimates. I need to do this for N=11,21,51,and 101 so i was trying to loop over these N's to do this at the same time. Unfortunately, it only gives the estimates for the last N and I cannot figure out how to store the other estimates as the loop goes along. I know I can just write four separate lines of could and get these values but I was trying to condense the code. My code below only gives the N=101 estimate. Is there any way of doing this and store the information as it goes.
for N= [11,21,51,101]
I tried many things, like if statements, but that ends up being more code than just the four lines. Any help would be greatly appreciated.