Problem using functions output
2 views (last 30 days)
Show older comments
working with some simple functions there are times when the values are displayed and times when they are not, is it something i am doing wrong or might it be matlab. It is probably myself but i don't see it. Here are two sample functions, Even with the ; sometimes output values are shown.
function [AI,dm,AIrows,AIcols] = image_stats(f)
dm = size(f);
AI = mean2(f);
AIrows = mean(f, 2);
AIcols = mean(f, 1);
end
function s = image_struct_loop(f)
K = size(f);
for k = 1:K(3)
s(k).dim = size(f(:, :, k));
s(k).AI = mean2(f(:, :, k));
s(k).Alrows = mean(f(:,:, k), 2);
s(k).Alcols = mean(f(:, :, k), 1);
end
end
0 Comments
Answers (1)
Image Analyst
on 7 Jan 2014
I don't see anything in the code that would display anything. You have semicolons after every line to suppress output to the command window, you have no fprintf(), no disp(), no echo, no msgbox(), no helpdlg(), no warndlg(), or any other kind of way to display something. Tell me exactly what gets displayed, and where it gets displayed.
0 Comments
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!