How do I input this into matlab as a numeric matrix?

I'm trying to find the eigenfrequencies of clamped-free annular plates. When using the symbolic toolbox the output eigenvalues do not match my comsol-made FE values, so I'm trying to figure out which is wrong. Any help would be much appreciated!

Réponses (1)

Steven Lord
Steven Lord le 14 Juil 2021

0 votes

Assuming you have numeric values for α, λ, and ν and assuming J, Y, I, and K are referring to the various Bessel functions see the besselj, bessely, besseli, and besselk functions.

3 commentaires

Would I just put these bessel funtions as a 4x4 matrix?
Like this? Seems reasonable to me unless there's some context from the previous sections of that chapter that I'm missing.
A = [besseli(1, 2) besselk(1, 2); besselj(1, 2), bessely(1, 2)]
A = 2×2
1.5906 0.1399 0.5767 -0.1070
Sorry, I'm not very good at explaining so I'll try to elaborate!
For example, I have my symbolic array code below:
%% SYMBOLIC Clamped-Free
Freq_Array = sym('X%d%d', [4 4]); %creates a 4x4 symbolic array
syms lambda
pr = 50e-3;
b = 5e-3;
f = b/pr; %alpha
A=-(2*(1-v1))./(f*lambda);
B=(2*(1-v1))./(f*lambda);
% %assign a value to each cell in array
Freq_Array(1,1) = besselj(0,lambda);
Freq_Array(1,2) = bessely(0,lambda);
Freq_Array(1,3) = besseli(0,lambda);
Freq_Array(1,4) = besselk(0,lambda);
Freq_Array(2,1) = besselj(1,lambda);
Freq_Array(2,2) = -bessely(1,lambda);
Freq_Array(2,3) = besseli(1,lambda);
Freq_Array(2,4) = -besselk(1,lambda);
Freq_Array(3,1) = besselj(1,f*lambda);
Freq_Array(3,2) = bessely(1,f*lambda);
Freq_Array(3,3) = besseli(1,f*lambda);
Freq_Array(3,4) = -besselk(1,f*lambda);
Freq_Array(4,1) = besselj(0,f*lambda);
Freq_Array(4,2) = -bessely(0,f*lambda);
Freq_Array(4,3) = besseli(0,f*lambda) + A*besseli(1,f*lambda);
Freq_Array(4,4) = besselk(0,f*lambda) + B*besselk(1,f*lambda);
C0 = det(Freq_Array);
lambda = linspace(1,50,2000);
determinant0 = double(subs(C0));
figure(1)
plot(lambda, determinant0, 'LineWidth', 1.5)
ylim([-10 10])
xlim([0 50])
xlabel('\lambda')
ylabel('Determinants of Bessel Matrices')
Where the figure looks like this:
Wherever the curve is 0, I then work out the Eigenfrequencies.
When I input this as a numeric matrix ie:
%% NUMERIC Clamped-Free
lambda = 0.1:0.01:50; %set up vector for lambda
pr = 50e-3;
b = 5e-3;
f = b/pr; %alpha
BessFuncs = [besselj(0,lambda) bessely(0,lambda) besseli(0,lambda) besselk(0,lambda); besselj(1,lambda) -bessely(1,lambda) besseli(1,lambda) -besselk(1,lambda);...
besselj(1,f.*lambda) bessely(1,f.*lambda) besseli(1,f.*lambda) -besselk(1,f.*lambda);...
besselj(0,f.*lambda) -bessely(0,f.*lambda) besseli(0,f.*lambda)+(A.*besseli(1,f.*lambda)) besselk(0,f.*lambda)+(B.*besselk(1,f.*lambda))];
I end up with a 4x19964 double, but how do I make a plot of the determinant and thus get the zeros this way?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Produits

Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by