error in imshow and alpha
이전 댓글 표시
I have been plotting my data by using "imshow" with "alpha" to make some objects to be more transparent. Everything has been working good. Never encountered problems before.
Like 10 minutes ago, when I processed and tried to plot my data. I got the error message like below:
"
Not enough input arguments.
Error in alpha (line 19)
alph = 1 + (z/d).^2 + Ax*(z/d).^3 + Bx*(z/d).^4;
"
I used this code the entire evening. Everything was good, but this error all of sudden started 10 minutes ago. The error persists in different PCs different MATLAB versions (2020b, 2021a) and different importing data.
Not sure what happened.
채택된 답변
추가 답변 (1개)
Image Analyst
2022년 10월 18일
편집: Image Analyst
2022년 10월 18일
What is the size of the Ax, Bx, z, and d variables? try taking it one term at a time
clc
size(Ax)
size(Bx)
size(z)
size(d)
term1 = (z/d) .^ 2
term2 = Ax * (z/d) .^ 3
term3 = Bx * (z/d) .^ 4
alph = 1 + term1 + term2 + term3
Let me know where it bombs, and everything you see in the command window.
Also, let us know how alpha and alph are related. "alph" is obviously a variable, but where do you declare or mention alpha?
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!