image processing - how to place functions in main file in matlab? -


i have small question, have created functions zoom, nni, bilenear displaying picture is:

zoom.m

function [out]= zoom(n,factor) ----- --- ---- end 

nni.m

function [out]= nni(n,factor) ----- --- ---- end 

bilenear.m

function [out]= bilenear(n,factor) ----- --- ---- end 

what trying: main.m

function [out]= answer(n, factor) clc function [out]= zoom(n,factor) function [out]= nni(n,factor) function [out]= bilenear(n,factor) end 

i want main function display zoomed picture, nni pic , bilenear separately

to build on schorsch's answer since mention want main function display these images try following:

function [out] = compare_interpolations(n,factor) clc zoomed = zoom(n,factor); nearest= nni(n,factor); bilinterp=bilinear(n,factor);  figure; subplot(1,3,1);imshow(zoomed);title('zoomed'); subplot(1,3,2);imshow(nearest);title('nearest neighbor'); subplot(1,3,3);imshow(bilinterp);title('bilinear');   end 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -