Info
此问题已关闭。 请重新打开它进行编辑或回答。
Error is coming how can I solve?
2 次查看(过去 30 天)
显示 更早的评论
Cell contents reference from a non-cell array object.
Error in Mineral_2 (line 12)
line([A(xmaxA) A(xmaxA)], [limh(1) max(A(:,2))], 'color', chrom{1},'Linestyle',':')
0 个评论
回答(3 个)
Caroline
2013-8-23
Could you post the code? It could be because you used {} instead of () to access the element of an array but its hard to say without seeing the code.
1 个评论
Image Analyst
2013-8-23
编辑:Image Analyst
2013-8-23
Before that line, put these lines:
whos chrom
chrom{1}
Tell us what it says. Then look at this link: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/
0 个评论
Walter Roberson
2013-8-23
You make chrom a cell array. Somehow it is not one at the moment in your code.
5 个评论
Image Analyst
2013-8-24
You need to have the same number of x values as y values, and you need, need, need to learn basic debugging skills. Is B an integer array, so that you might have multiple locations for xmaxA? What can you learn from doing this:
xValues = [A(xmaxA) A(xmaxA)]
size(xValues)
yValues = [limh(1) max(A(:,2))]
size(yValues)
Walter Roberson
2013-8-24
You still need the keyword 'color'
line([A(xmaxA) A(xmaxA)], [limh(1) max(A(:,2))], 'color', chrom,'Linestyle',':');
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!