Subscript indices must either be real positive???
Mostrar comentarios más antiguos
What does the above mean?
I have a variable that is used to count the iterations,
That same variable is matrix row specifier in another matrix.
A_matrix=[0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0]
del_hat_xi(1,1) = 0 % delta hat variables for A matrix population
del_hat_yi(1,1) = 0
del_hat_xj(1,1) = 0
del_hat_yj(1,1) = 0
del_hat_xk(1,1) = 0
del_hat_yk(1,1) = 0
coords = [1,NaN,5025.02600000000,1001.87500000000;2,NaN,5600,1500;3,NaN,5500,620;4,NaN,5100,620]
d_0_ij = [1,1,2,760.738862094609;2,2,3,885.663593019381;3,3,4,400;4,1,3,609.449601116450;5,1,4,389.165281469198]
d_0_row = 5
for r_cnt =1:d_0_row
% peruse d_0_ij FROM and TO station columns and specify A matrix
% columns to populate
del_hat_xi = d_0_ij(r_cnt,2)-1
del_hat_yi = d_0_ij(r_cnt,2)
del_hat_xj = d_0_ij(r_cnt,3)-1
del_hat_yj = d_0_ij(r_cnt,3)
% populate A matrix with values from linearised equation.
A_matrix(r_cnt,del_hat_xi) =(coords(r_cnt,d_0_ij(r_cnt,3)) - coords(r_cnt,d_0_ij(r_cnt,2))) / d_0_ij(r_cnt,4)
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!