How do I use the besselj function?
Show older comments
I've been given a row vector v and column vector z:
v = unique(randi(12, [1,4])-1);
z = linspace(0,10*(1+rand(1)),2e2).';
I'm supposed to produce an array M=Jv(z), where the columns of M(z) correspond to each value of v.
This is what I've made so far:
for i = [1:length(v)]
M(i)=besselj(v(i),z(i))
end
I had thought I made a correct array of M, with it being a 1x4 function, like v. However this doesn't allow me to make M a function of z, and I have a feeling I've completely misunderstood the documentation of the besselj function altogether.
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!