Docsity

Function Terminating-Network Programming-Project Codes, Study Guides, Projects, Research of Network Programming

Toggle sidebar
bg1
function [t t2] = terminating(num,nodes,set_val)
if set_val == 1
status = 'Error! Master Device selected';
else
status = [nodes(set_val).Device_Name ' is terminating connection from
the piconet'];
end
%% Two Nodes:
if num == 1
x = imread('52.JPG');
t = struct('simu', x,'stat',status);
t2 = imread('2.JPG');
end
%% Three Nodes:
if num == 2
x = imread('51.JPG');
t = struct('simu', x,'stat',status);
t2 = imread('4.JPG');
end
%% Four Nodes:
if num == 3
x = imread('50.JPG');
t = struct('simu', x,'stat',status);
t2 = imread('7.JPG');
end
%% Five Nodes:
if num == 4
x = imread('49.JPG');
t = struct('simu', x,'stat',status);
t2 = imread('11.JPG');
end
%% Six Nodes:
if num == 5
x = imread('48.JPG');
t = struct('simu', x,'stat',status);
t2 = imread('16.JPG');
end
%% Seven Nodes:
if num == 6
x = imread('47.JPG');
t = struct('simu', x,'stat',status);
t2 = imread('22.JPG');
end
%% Eight Nodes:
if num == 7
docsity.com
pf2

Partial preview of the text

Download Function Terminating-Network Programming-Project Codes and more Study Guides, Projects, Research Network Programming in PDF only on Docsity!

function [t t2] = terminating(num,nodes,set_val)

if set_val == 1 status = 'Error! Master Device selected'; else status = [nodes(set_val).Device_Name ' is terminating connection from the piconet']; end

%% Two Nodes: if num == 1 x = imread('52.JPG'); t = struct('simu', x,'stat',status); t2 = imread('2.JPG'); end

%% Three Nodes: if num == 2 x = imread('51.JPG'); t = struct('simu', x,'stat',status); t2 = imread('4.JPG'); end

%% Four Nodes: if num == 3 x = imread('50.JPG'); t = struct('simu', x,'stat',status); t2 = imread('7.JPG'); end

%% Five Nodes: if num == 4 x = imread('49.JPG'); t = struct('simu', x,'stat',status); t2 = imread('11.JPG'); end

%% Six Nodes: if num == 5 x = imread('48.JPG'); t = struct('simu', x,'stat',status); t2 = imread('16.JPG'); end

%% Seven Nodes: if num == 6 x = imread('47.JPG'); t = struct('simu', x,'stat',status); t2 = imread('22.JPG'); end

%% Eight Nodes: if num == 7

docsity.com

x = imread('46.JPG'); t = struct('simu', x,'stat',status); t2 = imread('29.JPG'); end

docsity.com