it says 'Value' must be a double scalar.
49 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nicole Angelique Castro
el 8 de Mayo de 2022
Respondida: Harsha Kalavakolu
el 11 de Mayo de 2022
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/990985/image.png)
2 comentarios
Respuestas (1)
Harsha Kalavakolu
el 11 de Mayo de 2022
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
0 comentarios
Ver también
Categorías
Más información sobre Numeric Types en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!