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.
Good morning everyone. I would love some insight regarding mechanical engineering and writing code. My physics professor (who also has a masters in electrical engineering) mentioned last night that the ability to write code (I apologize if I am using the term incorrectly...still kinda new to...
i wrote a script that codes phrases for me in c++ that should be impossible to solve
if anybody can solve the code i'll respond with the key and explain how it works
so here it is
05 08 13 52 19 55 89 44 33 77 10 82 88 84 23
65 46 52 57 95 37 93 18 11 29 40 69 34 97 87
21 52 17 33 86 20 37 96...
Consider S ={0120, 1010, 2011} as a subset of codes of length four over Z3 with d = 3 By (a) Show that S is a linearly independent set.
I am asked to show S is a linearly independent set. However, if I add 0120 + 0120, I get 0210. Since 0210 is not in the set S, is S still a linearly...
Homework Statement
My apologies if the error is an obvious one and many thanks in advance for any help given:
I am trying to create a Matlab code that simulates Lifting Line Theory in order to provide an estimate of the lift and drag of a 3D wing. My hope is to later use this as part of...
Hi,
I want to write a very simple code to plot the beam emittance knowing x,y,z and vx,vy,vz of each particle.
I have generated with a tracking code a very simple beam (cone distribution with 1° divergence) and I want to compare the emittance of this beam with the one calculated by a...
I took this code from the agrawal book: nonlinear fiber optics and I wanted to see the results :
%---specify input parameters
clear all;
distance= input('enter fiber length (in units of L_D)= ');
beta2=input(' dispersion: 1 for normal, -1 for anomalous');
N=input('Nonlinear parameter N=')...
hello
i just copied the Numerical Code for the NLS equation which is the following:
%---specify input parameters
clear all;
distance=input('enter fiber length(in units of L_D)=');
beta2=input(' dispersion: 1 for normal, -1 for anomalous');
N=input('Nonlinear parameter N=')...
Homework Statement
Hey guys. I am just learning machine code for Cortex-M. There are a few exercises within the textbook, however, I am not entirely sure if I am doing them correctly. If you could possible look over my work to see if there are any mistakes, I would greatly appreciate it! They...
I had a phone interview with a guy and I thought it went well. At the end he told me to send him a Java program that reads from a file containing a list of integers, one per line, and prints out all the pairs that sum to 8. I thought I made a pretty good algorithm that finds all the pairs that...
Figured this would be the safest place to post a question about Verilog Code seeing as how the people answering all my questions have obviously took this class. If there is another place I should post it then please inform me.
Just need someone to check my work.
Question: Write the verilog...
I have a verilog code for a simple 8-bit counter. I'm trying to build a testbench but for some reason it doesn't work. I'm using xilinx and when I run the simulation, the inputs work but the output doesn't work. It stays as XXX. Here is my verilog code and testbench.
module counter(enable...
Hi guys,
Does anybody here have an understanding of POS (point-of-sale) technology. I am looking for a way to print a QR-Code onto a till receipt if the dollar spend is over a set amount.
The QR-Code information to be printed would be pulled from a 3rd party server. Every till receipt that...
I would like to get some ideas for solving problems that occur on large coding projects. I'll just describe one for now but I have plenty of other examples. Please feel free to offer your suggestions, describe problems that you would like to find a solution for or derail it off in another...
def fib(n):
f0, f1, = 0, 1
for i in range(n - 1):
f0, f1 = f1, f0 + f1
return f1
It looks like it'd be linear, given there's only one loop, but when I plotted n against runtime, the relationship was quadratic, why?
Homework Statement
Create a mathematica code to add arbitrary number of 3 dimensional vectors.
1. n: the number of vectors which must be added
2. For each input vector, the code should accept the following:
a. Length of the vector
b. Three angles which the vector makes with x, y, and z...
Homework Statement
The following pseudocode demonstrates an algorithm to create a 2D array from a 1D array by adding elements into certain rows:
For i = 1, 2, ..., n
For j = i + 1, i + 2, ..., n
Add up array entries A[i] through A[j]
Store the result in B[i, j]
Endfor...
I am trying to find all combinations of a four element vector that contains only 1's and -1's.
Ex (1,1,1,1),(-1,1,1,1),...(-1,-1,-1,-1) etc
My idea to do this is pretty inefficient I am sure but I can't think of another way to do it, so here is what I was trying to do.
I found how many total...
These are some functions I'm using to encode and decode text.
bitstring returns a string of bits representing the ascii values of the characters in the string passed to the function. For example, passing in "Hi" changes it to "0100100001101001" since (int)'H'=72=01001000 and...
Identify "explicit shape spec list" in the FORTRAN code
Hi,
I'm trying to do some source code analysis using the ROSE compiler infrastructure on some of the kernels in NAS Parallel benchmark.
I get an error while parsing the Embarrassingly Parallel kernel. Digging further, I gathered that...
Dear All
I am a biologist trying hard to make it in the world of informatics and computing and I was wondering if one of you real scientists could help me.
I have a executable program with its associated .lib .exp and .pdb files.
I thought I could easily mex the cpp of this excutable...
I had an interview the other day and the lady was asking me about different ways to find whether there are any repeated elements in an array. At the end of the interview she told me to send her a code sample showing how to implement two of the ways we discussed. I thought that what I wrote was...
Hey everyone,
I have written a Fortran code for a project I am working on, but am having an issue: I can't get the code to output my data to the file I have opened. Here is what I am trying to do.
I am setting up a Monte-Carlo code that selects a random x- and y-value. These values are...
Homework Statement
You have two functions in Matlab (represented as column vectors). Compute their convolution using the fast Fourier transform.
Homework Equations
The Attempt at a Solution
I am having trouble finding a book with this topic. I would like to know where the...
Hi Forum users
I have a velocity autocorrelation code which was made to read a three component velocity vectors and I have modified to read a 9 component stress tensor data. I can compile it successfully but when I try to run it and compute a stress correlation function I get an error: i.e...
Here is another challenge that I thought was fun :cool:
A man wanted to get into his work building, but he had forgotten his code. However, he did remember five clues. These are what those clues were:
The fifth number plus the third number equals fourteen.
The fourth number is one more than...
Hello all,
i have frustrating task in my lab...
i have to generate a code in MATLAB that will get the focal length and the object distance from the lens, i.e image (1000X1000 pixels).
transfer it through the lens and, for the output it should be the result of it...
Is there a relationship between the distance and weight of a binary code?
I want to find the weight and distance of the code consisting of the codewords:
0000 0000
0010 1110
0101 1100
1011 1010
1110 0101
1100 1011
0111 0011
1001 0111
(spaces inserted for readability)
The weight can be checked...
Hi everyone,
I would like to program water thermodynamic properties in C, C++ or Matlab in order to model a steam power plant. I'm particularly interested in getting the enthalpy of the fluid by knowing the temperature and the pressure.
I recently found out the software Cantera...
Hi,
I have the following Latex code, which is perfectly working under the class report, but when I change the class report to beamer to make slides, I get errors. Why?
\documentclass{report}
%\documentclass{beamer}
%\setbeamertemplate{navigation symbols}{}...
Hi,
I am trying to incorporate the following equation into Matlab in the red:
http://http://www.radikal.ru][PLAIN]http://s018.radikal.ru/i518/1305/16/1cc0d2a72d38.jpg
The following data is to be used:
t=3000000
nr=nx=161
q=0.02
k=5e-13
mu=0.00035
c=1.5e-8
phi=0.25
rw=0.1
h=4.5...
does a hamming code always corrects one error and detect 2 errors ? and is the distance always 3 ?
I know that that is true for (7,4) hamming code but does that apply to a (11,7) or (15,11) ?
if not please let me how to get the answers
Homework Statement
I am trying to solve and plot the function, x'(t) = 1 + t*sin(t*x) where x(0) = 0 and t_final = 1, in order to compare this exact solution to the approximations of Euler's and Improved Euler's Method. Can anyone help me with the code in order to solve this problem, and then...
Hi everyone,
I am trying to solve and plot the function, x'(t) = 1 + t*sin(t*x) where x(0) = 0 and t_final = 1, in order to compare this exact solution to the approximations of Euler's and Improved Euler's Method. Can anyone help me with the code in order to solve this problem, and then plot...
Hello!
I'm writing a paper where I'm going to use markov models to evalute a device. My base for this paper is the paper written by H. Timbley. I have never used Mathematica before and thought that I would start by trying the complete code that Timbley has written in the appendix of the paper...
hello
I'm a beginner in c programming. I wrote a code that converts the lower case that the user entered to upper case characters.
I want to improve my program , but since I'm a beginner i might not be aware of some technics .
my program can only allow you to enter as many characters as...
please help i have to write a MATLAB code for DETECTION OF THE LOCATION AND SIZE OF A CRACK IN STEPPED CANTILEVER BEAMS BASED ON
MEASUREMENTS OF NATURAL FREQUENCIES
the reference paper is
DETECTION OF THE LOCATION AND SIZE OF A
CRACK IN STEPPED CANTILEVER BEAMS BASED ON
MEASUREMENTS OF...
Hi
I want to define an Am-Be source in MCNPX 2.6
But I don't have Gamma spectra of this source.
Is there any computer code that can simulate (Alpha,Gamma) reaction?
Please Help!
Hi I built this code that runs well. Is about calculating a student loan... The problem is that I wish I could create a table that will tell me in each column "payment number", "remaining balance", "interest amount", "principal amount" Can you help me do this? I am new to python and this is not...
Hi all, I have a simple question about 3D plotting.
Consider this simple loop, which provides y and O for any x. and I am able to plot y vs O for given x.
for Omega=0:.01:5
y(i)=(x*Omega^2);
O(i)=Omega;
i=i+1;
end
now consider I want to change the value of x, for x=0:.1:3...
Homework Statement
I'm trying to write Mathematica code to use Kramers-Kronig on a csv file with 2 columns. Column 1 is h(eV). It goes from 0 to 6, in increments of 0.1. Column 2 is alpha (cm^-1).
In the equation below, I'm guessing column 1 is Ω. But what should I put in for ω?Homework...
Homework Statement
Ok So this is an example from my text. I am having trouble following a portion of it and was curious if anyone could shed some light on it. I've typed most of it and posted a screen shot of the second portion since there is a table involved.
Determine the PSD of the...
Hi all,
I hope my post is in the right section. I need some help with decoding a Playfair code.
I only have the ciphertext which is 22 lines long. What's the best way to do this? I red that I have to do some frequency analysis of the English bigrams which I did. There's one combination which...
I posted this on my website a couple days ago. I like puzzles a lot, so I figured I would share it here and see how many people could figure it out; enjoy!;)
A man wanted to get into his work building, but he had forgotten his code. However, he did remember five clues. These are what those...
Hi
I have written an extensive simulation in C++ and when I run it on my quad-core machine, only a single core is used (on Windows). This is because my code is not parallelized.
I'm not familiar in any way with code running in parallel, except in Matlab where is happens almost...
Hello there!
I typed this code and saved it as a .c file
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int main()
{
int a;
while(1)
{
if (kbhit())
{
system("cls");
printf("%d...
I searched for this but couldn't find a sol.
when entering the code for sets i.e. \mathbb{N}
I get this error message:
! Undefined control sequence. <recently read> \mathbb
l.32 $\mathbb{N}$
The control sequence at the end of the top line
of your error message was never \def'ed. If...
I am not able to get what's wrong in below.
IF ( temp < 97.5 ) THEN
WRITE (*, *) NTemperature below normalN
ELSE IF ( temp > 97.5) THEN
WRITE (*, *) NTemperature normalN
ELSE IF ( temp > 99.5) THEN
WRITE (*, *) NTemperature slightly highN
ELSE IF ( temp > 103.0) THEN
WRITE (*, *)...