Hi all,
Can i ask if somebody can help me on why i got 'matrix dimension don't agree' thereby cannot get a plot for first order bessel derivative.
If i type 'diff(besselj(1,z),z)', i'd get 'besselj(0, z) – besselj(1, z)/z'
but then when i want to plot 'besselj(0, z) – besselj(1, z)/z' by typing:
format longz = (0:1:100)';a=besselj(0, z) - besselj(1, z)/z;plot(z,a)
it'd give error as below:
??? Error using ==> minusMatrix dimensions must agree.Error in ==> Untitled at 4a=besselj(0, z) - besselj(1, z)/z;
for some reason the second term gives 101×101 dimension which doesnt agree with the first term (101×1).
Best Answer