In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communication channel or storage in a storage medium. An early example is an invention of language, which enabled a person, through speech, to communicate what they thought, saw, heard, or felt to others. But speech limits the range of communication to the distance a voice can carry and limits the audience to those present when the speech is uttered. The invention of writing, which converted spoken language into visual symbols, extended the range of communication across space and time.
The process of encoding converts information from a source into symbols for communication or storage. Decoding is the reverse process, converting code symbols back into a form that the recipient understands, such as English or/and Spanish.
One reason for coding is to enable communication in places where ordinary plain language, spoken or written, is difficult or impossible. For example, semaphore, where the configuration of flags held by a signaler or the arms of a semaphore tower encodes parts of the message, typically individual letters, and numbers. Another person standing a great distance away can interpret the flags and reproduce the words sent.
Having a bit of trouble understanding why there are two different truth tables for BCD to Gray.
Using ABCD as the BCD and WXYZ as the Gray,
The way I learned it is:
1) MSB of BCD (A) = MSB of Gray (W)
2) A ⊕ B = X
3) B ⊕ C = Y
4) C ⊕ D = Z
5) Since BCD only ranges from 0 - 9, 10 - 15 become...
So I'm writing a short subroutine to compute a QR factorization of an (mxn) matrix using the Householder method. To test this, I'm computing the factorization of the matrix
12 -51 4...
Generate 225 samples of size 625 random numbers from U(10,22). For each of these 225 samples calculate the mean.
a) Find the simulated probability that the mean is between 10 and 11.
b) Find the mean of the means.
c) Find the standard deviation of the means.
d) Draw the histogram of the...
Homework Statement
This is not homework but I am trying to solve a problem to see to general a set of numbers for the grassmanian equations to use in something else.[/B]
I have five variables a,b,c,d,e. a-b,a-c,a-d,a-e,b-a,b-c,...etc so that none of them are the same so it generates all...
I'm studying in the field of library production for code MCNP. I use makxsf Code to do this operation. I have a simple example . I've produced library by makxsf for this simple example. I've encountered some problem now.
keff has decreased in the higher temperatures suitably, but keff has...
Hello everybody.
I am looking question for programming and computer science since 6 months and i see a lot of threat speaking about time consumption and optimization. I just want to say that INTEL COMPILER and INTEL PROFILER are available on intel website for FREE as a student license without...
Hi guys, there's a bug in my code which I've been trying to get rid of for the last 2 weeks. I'm completely out of ideas now on what it is so I have to turn to you guys for help. The code is here:
module helectron
use params
use parallel
!* electron density parameters
integer ...
Hello,
I m looking for a mathematica code for the multinomial expansion of the general case of (let's say m sum terms given in a power of n), e.g., the code for the 1st equation in http://en.wikipedia.org/wiki/Multinomial_theorem
Any help would be useful.
Thanks
In c I quite often build header files with a bunch of predefined data. Fill it with structures or what not.
Then to include that information in my program its a simple #include "myHeader.h"
Is there a way I can do this in python?
I've created another file "myHeader.py"
Have put in some code to...
Hi everyone,
I will start off by saying that I am a complete novice in Matlab and prefer to use Excel however the data that I have requires more computing power than Excel can provide.
I have 16 sets of data with over 70,000 rows and 9 columns. The first column is a time series separated into...
Bidders propeses ASTM A36 material istead of S275 J2 or S355ML/NL for structural steel (Piperack, Equipment Structure, etc.) on the basis of international standards for most optimal and economical design. Is it really optimal? pls explain why
Hi comunity! I need to make a code o a normal distribution of velocities, starting whit a random secuence uniformly distributed between [0,1]. I am using FNT95, with Plato. I want to obtain a ''for'' bucle with I=1,N for the velocities.
It is importan for the distribution to have sigma defined...
Homework Statement
Hi everyone. I am currently embarking on a Morse Code project which involves building a circuit to display Morse codes, eventually displaying the Morse code with a 7 segment display.
I am currently stuck at the first stage as I am not sure of what to do, i.e. what chips to...
Hi guys, I can't figure this one out. Here I am working with a piece of code which should read in a grid of 2 arrays, a radius array and an electron fraction array. The code looks like this:
subroutine varelec_init(varelecfrac,elecprofile,effilename,elecfracname)
integer ...
Homework Statement
You are to write a program that will display your full name and your major (First Name, Middle name and Last Name) on the Terminal Input/output (I/O) screen.[/B]
Homework EquationsThe Attempt at a Solution
I was trying to get the screen to say "What's your first name?"...
Homework Statement
- Calculating the factorial of a number N
- For simulating the roll of a die 200 times (include the calculation for the relative frequency of the number 4 in the upface of the die within the 200 rolls)
Homework Equations
None?
The Attempt at a Solution
I am taking this...
So I am going to be making some keys; and I want to make them more random... So I made this:
#I know that the code is pretty crude, but it works.
#P.S. it is an infinite loop, run at your own risk
import random
from random import randint
import string
import time
x=1
n=randint(5,90)...
The blobdetector consist of the following functions:
gaussImage: Filters a image with a gaussian filter
gaussPyramid: Uses gaussImage to filter the same image several times with different std.
diffOfGaussians: Uses gaussPyramid to compute the difference between consecutive filtered images...
Hey all, I was looking at some example code where they said "this[r, c] = sourceMatrix[r, c];"
where sourcematrix is double[][] but its in a custom local class, the code runs and works. but I am confused as to what "this[r, c]" does, how can a custom class be an array of doubles at the same...
In the last semester I was taking a microcontroller programming course. For the programming assignments, our professor would hold an extra credit competition where we competed for the smallest, fastest, and most energy-efficient code for the same application. It got me thinking.
What I'm...
The encryption method is extremely simple and the first letter is already in plaintext (the character number that is).
The plaintext is plain english.
[79, 32, 79, 39, 45, 39, 112, 21, 50, 64, 37, 5, 107, 4, 36, 87, 35, 81, 48, 94, 57, 92, 46, 93, 125, 9, 102, 70, 42, 69, 51, 86, 92, 5, 106...
I came across this question while studying for a C++ exam. What is the screen output of the code?
#include <stdio.h>
int main(){
int i, counter=0;
for(i=0;i<100;counter++){
i++;
++counter;
}
cout<<i<<' '<<counter<<'\n';
return 0;
}
What will this code display...
I have been given a project to modify my pre-existing code to satisfy these guidelines:
- Create a file called "sides.txt" and put it in the same folder as your program.
- The file contains multiple lines with each line having the three sides, separated by white spaces, e.g.,
3 4 5
6 8 10
5...
http://wilmott.com/i/dominant/block.gif
I have worked with generation of transition probabilities of mean reverting CEV type stochastic differential equations using Girsanov theorem. A variable grid is generated and Transition probabilities are calculated from the well known analytic...
Can someone please help me with the correct Latex code for the functor Hom_R( _ , X)
When I try to get the correct symbol for the functor I get Hom_R( _ , X) , that is I get a symbol without the _ displayed.
Can someone please help me with the correct code?
Peter
I noticed some interesting utility in using ? and : when writing some recursive code out of boredom. I thought I'd share some of the code for those interested.
These were written in C, and I must say they simplify a lot of code.
#include <stdio.h>
#include <math.h>
/* Return x raised to the...
So we're using NXT 2.0 and MATLAB to program a robot to follow a white line through a maze.
I'm using a light sensor, color sensor and an ultrasonic sensor in the process. Any programming/Coding ideas of how i should start?
This is the maze...
I just uploaded a post on the class SE of short exact sequences in Mod_R ... and tried to use Latex Code to achieve the same fancy script for S and E as Paul E Bland used in his text "Rings and Their Modules" ... but seemingly did not achieve the right script for S (E seems OK, or at least...
Hello,
I have a three dimensional FDTD code. The problem I have for simulation is one dimensional. How can I use this 3D FDTD code for the 1D problem. The 1D problem is like this: in one-dimension half of the problem space is filled with a dielectric medium and the other half is free-space. A...
I am trying to compile several libraries of FORTRAN code and getting the error message as can be seen in the screen shot. As I do not have any experience with FORTRAN I am not sure what is wrong in the line highlighted line. Any help would be greatly appreciated! Thanks a lot! :-)
Hello guys, I'm writing to get some help on an exercise I've been thinking but I can't get to solve.
I have to write the code for the Example 8.5 of the book White, Fluid Mechanics. Here is the problem and the solution I have to obtain.
It is about one duct that has three sections in which I...
Homework Statement
Using maple cw version, trying to write a state that will compute f=x/y^2 over several iterations.
y^2 is changing but x is dependent on a value input my user.
I don't really know how to write the loop?
I need the loop to run on an interval of different y values that I can...
Homework Statement
I have the following code (please see below). I want it to return [2,4,6,8,10] which is the function evaluated at the given list [1,2,3,4,5]. I want to do this using the process command.
My problem is:
print A returns
[None, None, None, None, None]
But I want it to return...
I heard this method of creating a code described in a movie a long time ago.
Two people want to send encoded messages to each other by mail(or now email). To encode their messages they both buy the same novel , let's say Moby Dick.
To write the message they use a system where a triple set of...
Homework Statement
Not homework, but I'm wondering why a certain piece of code seems to run faster than another.
Homework EquationsThe Attempt at a Solution
I'll mention a few relevant structs to be more clear:
struct intlist {
int *elems;
int capacity; /* Maximum number of elements...
Homework Statement
design a code converter that converts a decimal digit from the 8 4 -2 -1 code to BCD.
Homework EquationsThe Attempt at a Solution
so i listed out the BCD order from 0 to 9 and listed the weighted 8 4 -2 -1 code so that the weights would equal to the BCD equivalent.
8 4 -2...
I'm trying to grasp some basic concepts of analyzing code segments. Not sure if I have the right thought process. Can't find many examples online.
Homework Statement
A.)
for (i=1; i<n; i++)
for (j=1; j<n; j++)
return 1
Guess: Theta(n) because both loops go to (n) and they're...
Greetings all !
I really hope this is the right sub-forum for my question, I have chosen it because I've seen TLE being mentioned a couple of times around here.
I have done some reading on astrodynamics and orbital mechanics, but I am relatively new to coding. I would like to write some C++...
Homework Statement
does anyone know why C24 (the extended Golay Code) doesn't have any words of weight 20? I know that it only has words of weight 0,8,12,16, & 24, but why is 20 skipped here?
Homework Equations
I am asked to deduce this from the fact after I have shown that the code does...
Consider the following java code
int a=1;
if (a != 0)
{
int a=3;
}
System.out.print(a);
What is the output
A. 0
B. 1
C. 3
D. No output. A compilation error occurs
The answer is B. I want to ask why the output shown will not be 3. As the 1 is not equal to 0, should the ' int a '...
Homework Statement
A = [1 3; 2 4]; %Okay, so we are starting with this matrix
N = 2; %Here we are setting N equal to '2'
for k = 1:N %So here we have a 'for loop' for variable 'k' starting at 1 in increments of '1' up to 'N', which
%happens to be '2' so once this function gets to '2' it...
When running the following code on Matlab:
>> y(i) = y(i-1) + (0.5 * y.^3 * exp(t^2 + t))*h
I get the error:
? Error using ==> mpower
Matrix must be square.
It seems fairly simple but I'm not quite sure what I'm overlooking. Any help with regards to what I may be doing wrong would be...