Triple Summation in Matlab
Ältere Kommentare anzeigen
Following Formula uses triple index summation.

How can I achieve this in matlab. All of the terms being summed are row vectors ( coefficients of polynomial ) except f(xi , yj , zk) is a row vector of numbers.
5 Kommentare
Ameer Hamza
am 29 Jun. 2020
If Lp,i Lq,j and Lr,k are row vectors, then what do the variables x y and z denote here? Are x, y, and z vectors or scalars? Can you show how these terms are defined?
Walter Roberson
am 29 Jun. 2020
If x and y and z are row vectors, then:
if
is a scalar, then scalar times row vector x times scalar
would be row vector, and then multiplying by y would be row vector times row vector, which would be understood as algebraic matrix multiplication and would fail because the size of the second dimension (length of the first row vector) would not match the first dimension (1) of the second row vector.
I think you have size problems in your definitions.
Jalal Hassan
am 29 Jun. 2020
Walter Roberson
am 29 Jun. 2020
size of f(xi ,yj ,zk) is equal to (size of x) * (size of y) * (size of z)
That means that given scalar xi, yj, zk, then f(xi, yj, zk) is a 3 dimensional array. A 3 dimensional array is not a "row vector"
p=length(x)
That disagrees with p=2 for x = [x0 x1 x2] . It looks to me as if p is the degree of the polynomial implied by x, which would be length(x)-1
This simply means that from lagrange coefficients matrix we have to use first row which is a polynomial.
As in sum(L3(1,:) .* x.^(length(x)-1:-1:0)) ?
Jalal Hassan
am 29 Jun. 2020
Bearbeitet: Jalal Hassan
am 29 Jun. 2020
Antworten (0)
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!