Problem using functions output
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Image Analyst
le 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 commentaires
Voir également
Catégories
En savoir plus sur Environment and Settings dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!