Problem using functions output
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Image Analyst
il 7 Gen 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 Commenti
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!