필터 지우기
필터 지우기

Building Sparse Matrix with Integer Errors

조회 수: 1 (최근 30일)
EB
EB 2019년 10월 24일
편집: EB 2019년 10월 24일
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
John D'Errico
John D'Errico 2019년 10월 24일
To avoid your next error, spdiags is spelt spdiags, not spdiangs.
EB
EB 2019년 10월 24일
Haha, thank you.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2019년 10월 24일
편집: Matt J 2019년 10월 24일
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개)

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by