Preview

Matlab Project、1

Good Essays
Open Document
Open Document
820 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Matlab Project、1
EK127 Matlab Project 1

Yiming Zhang (C1)

Folder name:Yiming_Zhang

-------------------------------------------------
PART A: Write a function subEncrypt such that will encode a message using the simple substitution algorithm discussed in the introduction.

function encrypt=subEncrypt( plaintxt,key )
%this function help to encode a message using the simple substitution algorithm
%Your plaintxt should be entered in all capitals numkey=(65:90);
%stand for Letters A~Z encrypt=zeros(1,length(plaintxt));
%vectors with the length of your massage
%equivalents of the encrypted message. for ASC=1:length(plaintxt) num=find(numkey==plaintxt(ASC)); encrypt(ASC)=key(num); end end

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------

-------------------------------------------------
PART B: Write a function subDecrypt such that it will decrypt a message

You May Also Find These Documents Helpful

  • Good Essays

    Match common encryption algorithms and methods with the scenarios representing real-world business applications and requirements.…

    • 406 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Unit 9 Project Part 1

    • 747 Words
    • 5 Pages

    GSDC is a software development firm with sales, marketing, and project offices in major cities of North America. We provide a global project management services, on-site personnel as needed for design, and testing and liaison with teams of developers in India and Eastern Europe. GSDC is known to have extensive experience in website development and have completed several successful websites implementation for institutions of higher education.…

    • 747 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    130Lab Quiz 1

    • 247 Words
    • 2 Pages

    4. Why should loose hair, clothing and jewelry be restrained while you are performing an experiment?…

    • 247 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Lab10 worksheet

    • 1151 Words
    • 5 Pages

    Will the Group Policy settings you configure in your new GPO have an immediate effect on your network? Why?…

    • 1151 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    2. Decrypt the following. You may use one of the readily available tools on the internet to perform this encryption. Please provide the link (URL) of the tool you used.…

    • 559 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    NETWORKING ADMIN

    • 606 Words
    • 3 Pages

    Match common encryption algorithms and methods with the scenarios representing real-world business applications and requirements.…

    • 606 Words
    • 3 Pages
    Good Essays
  • Good Essays

    MPII 002: Task 1 (part 1)

    • 398 Words
    • 2 Pages

    Within my role I need a written consent from the child’s parents for proof that the child actually needs that medication as well as having the parents signature within that written consent, having verbal consent isn’t official you need to have prescribed.…

    • 398 Words
    • 2 Pages
    Good Essays
  • Good Essays

    There are three parts to this project. You must complete Part 1 (60 points), but you may choose to do either Part 2 or Part 3 (40 points each). You may also do all three parts for a total of 140 points; however, you must fully complete either Part 2 or Part 3 to get credit (NOT ½ of Part 2 and ½ of Part 3). This project is due on December 5th. Turning it in late forfeits your right to extra credit and there will be a 10% deduction for each day it is late. You must show all of your work and write your answers in complete sentences; failure to do so will result in loss of credit. You must show work on separate sheets of paper and staple them to this packet when…

    • 2115 Words
    • 9 Pages
    Good Essays
  • Good Essays

    MM1 simulation in Matlab

    • 884 Words
    • 4 Pages

    mm1 simulation in matlab clc;clear; ST_Idle=0; ST_Busy=1; EV_NULL=0; EV_Arrive=1; EV_Depart=2; EV_LEN=3; Q_LIMIT=1000000; % next_event _type=[]; % num_custs _delayed=[]; % num_delays _count=[]; % num_events=[]; % num_in _queue=[]; % server_status=[]; % area_num _in _queue=[]; % area_server _status=[]; % mean_interarrival=[]; % mean_service=[]; % clock=[]; % time_last _event=[]; % total_of _delays=[]; time_arrival=[]; time_next _event=zeros(1,EV_LEN); num_events=…

    • 884 Words
    • 4 Pages
    Good Essays
  • Good Essays

    %-in an AWGN channel %-in a Rayleigh fading channel %-in an AWGN channel when direct sequence spreading is used…

    • 1227 Words
    • 5 Pages
    Good Essays
  • Good Essays

    INTRODUCTION TO MATLAB

    • 832 Words
    • 8 Pages

    1.9 The diameter of a 26 AWG copper (conductivity = σ = 5.69 × 107 S/m) wire is 0.405mm.…

    • 832 Words
    • 8 Pages
    Good Essays
  • Powerful Essays

    Solving Ode in Matlab

    • 12466 Words
    • 50 Pages

    L.F. Shampine and I. Gladwell Mathematics Department Southern Methodist University Dallas, TX 75275 S. Thompson Department of Mathematics & Statistics Radford University Radford, VA 24142…

    • 12466 Words
    • 50 Pages
    Powerful Essays
  • Good Essays

    The first letter of the secret word was lined on the y-axis. The plaintext character then substituted the corresponding letter. This method was repeated for all key words characters. The word was then repeated after all the characters of the key word were used. If the plaintext to be encrypted…

    • 742 Words
    • 3 Pages
    Good Essays
  • Good Essays

    System Simulation in Matlab/Simulink Exercise 1: Matlab part 1) Plot the function yx=2∙x-x2+sin(2∙x)∙cos⁡(x) function problem1 (x) y=2.*x-x.^2+sin(2.*x).*cos(x) plot(x,y,'r') end 2) Print n! from n=2 to 20 function problem2 for k=2:20 n=factorial(k)…

    • 1967 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Matrices in Matlab

    • 6867 Words
    • 28 Pages

    >> A(2,3) ans = 0 This is indeed the element in row 2, column 3 of matrix A. You can access an entire row with Matlab’s colon operator. The command A(2,:) essentially means “row 2 every column” of matrix A. >> A(2,:) ans = 5 -1…

    • 6867 Words
    • 28 Pages
    Good Essays

Related Topics