Receiving NaN's instead of values in select excel imports (script issue)

조회 수: 1 (최근 30일)
Julian
Julian 2023년 9월 4일
답변: Yash 2023년 9월 12일
Hi, I am trying to extract mean eigenvalues and vectors for spinel grains in rock samples I am studying.
When I import (all as numerical matrices) the .xlsx sheets with less rows (up to 961 rows) it works fine. Anything higher (next highest has 1223 rows) spits out NaN's. Workflow up to this point has been the same. Any help appreciated.
I just need to do
x=spinelMean(AA) **I've been calling the imports AA** and I should get a 3x3 matrix of values.
Thanks in advance.
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2023년 9월 4일
편집: Dyuman Joshi 2023년 9월 4일
"When I import (all as numerical matrices) the .xlsx sheets with less rows (up to 961 rows) it works fine. Anything higher (next highest has 1223 rows) spits out NaN's."
How are you importing the data?
It's working fine with readtable

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

답변 (1개)

Yash
Yash 2023년 9월 12일
Hi Julian,
As I can understand, you are encountering issues with importing the data. In general, '.xlsx' files are imported into tables using the "readtable()" function. I have made an attempt to read the data provided in your query using the "readtable()" function, and it is functioning correctly. You can find more details about the "readtable()" function by visiting the following documentation link:
Additionally, you may find the article below helpful, as it provides various methods for reading spreadsheets into tables:
I hope the provided information helps in resolving the issue.
If the issue still persists, for better understanding of the issue, I suggest you share the code you are using to import the sheets. I am not able to reproduce the issue at my end because there is an unknown function in the "spinelMean.m" file named "logEFromSpinel". Any information related to the definition of this function would help me to resolve the issue.

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by