Problem using functions output

2 Ansichten (letzte 30 Tage)
Tony
Tony am 7 Jan. 2014
Beantwortet: Image Analyst am 7 Jan. 2014
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

Antworten (1)

Image Analyst
Image Analyst am 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.

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by