Borrar filtros
Borrar filtros

How to find the unknown (value of 'a', which has more than 1 answers), if we already have known data from excel?

2 visualizaciones (últimos 30 días)
Dear All,
Currently I have alot of data (in excel format from experimental measurement). I need to find an unknown from a equation, where the X and Y value of data to be included in the equation. I have run few codes, but could not find the unknown 'a' as error "Empty sym: 0-by-1" keep pop up once I troed to solve the equation.
Below are the is the:
1) Example of data:
Data.GIF
2) Details and equation used:
load Data.txt
syms a % unknown 'a'
d = 700e-6
rad = d./2
t = 1000e-6
c = 345.2
n = 1.83e-5
den = 1.189
X = Data(:,1)% X data from excel
w = 2*pi*X
D = 0.0042
p = 0.00615
k = rad*sqrt((w*den)/n)
Z1 = (((32*n*t)/(d.^2))*(1+(k.^2)/32).^(1/2))
z = Z1/(p*den*c)
Rs = (1/2)*(sqrt(2*n*den*w))
Y = Data(:,2) % Y data from excel
eqns = z + ((2*a*Rs)/(p*den*c)) == Y %Answer of the eqns is equal to Y values
solv = solve (eqns,a)
plot (X,a)
Above is the latest code I have run. Supposedly, my expectation, I will get 5 different values of 'a' and at the end I will plot graph X versus a to proceed to the next step.
Anyone can give and advice why this problem happens, do I have correct my code.
Any help will be appreciated.
Thank you.
Regards,
Nur Arafah
  3 comentarios
Jafar Nur Arafah
Jafar Nur Arafah el 28 de Mzo. de 2019
Dear darova,
Thanks for your reply.
I had try it before but it not working. Maybe at that time the code was wrong. Will try again with your suggestion.
Thank you very much.

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by