Building Sparse Matrix with Integer Errors
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying ot build a sparse matrix, but I keep receiving the error: Subscript indices must either be real positive integers or logicals.
My eps are all real positive integers and my Phi_1 values are positive values to the smallest is 3*10^(-4). Does this not count?
2 Commenti
Risposta accettata
Matt J
il 24 Ott 2019
Modificato: Matt J
il 24 Ott 2019
My eps are all real positive integers and my Phi_1 values are positive values to the smallest is 3*10^(-4). Does this not count?
3*10^(-4) definitely does not count as a positive integer (because it is not an integer). However, the error you are getting has nothing to do with the values of eps or Pi_1. It has to do with xs. In this line,
F = ffunc(xs)';
ffunc is a matrix, not function, and so xs are expected to be indices (positive integers), not function inputs.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Sparse Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!