

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is Matlab code. This code is part of project in Network Programming course. It was submitted to supervisor and course instructor Prof. Tausiq Dasgupta at Babasaheb Bhimrao Ambedkar University. It includes: Function, Terminating, Network, Progamming, Project, Code, Master, Device, Nodes, Connection
Typology: Study Guides, Projects, Research
1 / 2
This page cannot be seen from the preview
Don't miss anything!


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
x = imread('46.JPG'); t = struct('simu', x,'stat',status); t2 = imread('29.JPG'); end