Hi, This is my code.[fname path]=uigetfile('.jpg','open a image as input for trining'); fname=strcat(path,fname); im=imread(fname); imshow(im); title('Input Image'); c=input('Enter the Class (Numbers from 1-10)'); %%Feature extraction F=FeatureStatis
2 次查看(过去 30 天)
显示 更早的评论
c=input('Enter the Class (Numbers from 1-10)') in here I want to put the image class in string characters. how can I do it insted of numbers.
0 个评论
采纳的回答
Image Analyst
2018-9-16
To get your number as a string instead of a double, use the 's' option:
classNumber = input('Enter the class number : ','s')
2 个评论
Image Analyst
2018-9-16
Don't use braces. Try this:
for k = 1 : size(Ftrain,1)
dist{1,:} = aum(aba(Ftrain{1,:}-Ftest));
end
but I'm not sure what your variables are. Use braces only with cell arrays and tables. See the FAQ: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!