Trying to format a matrix correctly

Hi,
I have an array of 211 xdata points.
The matrix I am trying to create is this
eqn.PNG
Where lambda is related to the xdata points
L = 1 - (xdata ./ 100); %Lambda
Lambda_inverse = L.^-1;
The idea is I am calling a function that will generate a number at each x data point, so really it should be 211 matrices and where matrix 1 is used for point 1, matrix 2 is used for point 2 and so on.
I tried to make a big matrix that would include all this information, and failed miserably!
dummy=zeros(length); %where length is the number of xdata points
F = [Root_L_inverse dummy dummy; dummy Root_L_inverse dummy; dummy dummy L];
What would be used in the function is the trace of the matrix at each xdata point
I1 = trace(F);
fun = @(W,xdata) -Area.*( (W(1).* exp( (W(2)) .* (I1 - 3)) ) .* (L.^2 .* Lambda_inverse) )
Where W(1) & W(2) are unknown constants that I am trying to fit to the data.
I know I haven't gone about this method the correct way, any help would be greatly appreciated!

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Preguntada:

el 21 de Nov. de 2018

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by