generating a diagnoal matrix

1 visualización (últimos 30 días)
Hello Matlab
Hello Matlab el 3 de Abr. de 2015
Comentada: Star Strider el 3 de Abr. de 2015
Hello,
I need to initiate a matrix, like this:
SQ = diag ( sequare root(sqrt(S(l,:))-segma), sequare root(sqrt(S(2,:))-segma)......sequare root(sqrt(S(9,:))-segma),0)
But not sure how to do this in Matlab, my code is here, and I stopped at SQ line, I put a loop from 1 to 10 for j, but not sure how to do the rest of this Matrix
function [B] = FD(A,l)
[n,d] = size(A);
B = zeros(10,d);
B(1:9,:) = A(1:9,:);
for i=10:1125,
B(10,:) = A(i,:);
[U,S,V] = svd(B);
segma = sqrt(S(10,:));
for j=1:10,
SQ= diag ......
end
end
  1 comentario
Star Strider
Star Strider el 3 de Abr. de 2015
Please provide an example of the matrix you want to create and the data you want to use from which you want to create it. It is not at all clear from the code you have provided.
What does the ‘sequare root’ function produce? We have absolutely no idea.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Particle & Nuclear Physics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by