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

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -