필터 지우기
필터 지우기

Problem using functions output

조회 수: 1 (최근 30일)
Tony
Tony 2014년 1월 7일
답변: Image Analyst 2014년 1월 7일
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

답변 (1개)

Image Analyst
Image Analyst 2014년 1월 7일
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.

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by