it says 'Value' must be a double scalar.

조회 수: 54 (최근 30일)
Nicole Angelique Castro
Nicole Angelique Castro 2022년 5월 8일
답변: Harsha Kalavakolu 2022년 5월 11일
  댓글 수: 2
Torsten
Torsten 2022년 5월 8일
Display what you get for lda, exponent and denominator.
Walter Roberson
Walter Roberson 2022년 5월 8일
I suspect that the temperature edit field is empty.

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

답변 (1개)

Harsha Kalavakolu
Harsha Kalavakolu 2022년 5월 11일
Hello Nicole
From the error that you have mentioned, I understand that whatever you are passing as argument is not a double or is not a scalar.
As you are using double conversion function "double(...)", so the problem must be that the number is not scalar. There is a possibility that the argument you are passing can be a complex number or a vector. So, try to trace the value of "Liqdensity" you are passing, by debugging and make sure you are passing correct type of argument. I suggest you use "num2str" to convert complex numbers into strings. You can use "dbstop if error" and check the value stored in "Liqdensity".
Hope it Helps

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by