What is Code: Definition and 958 Discussions

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.

View More On Wikipedia.org
  1. M

    Troubleshooting C Code: Segmentation Fault in GCC on Ubuntu

    the following code #include<stdio.h> #include<stdlib.h> int main (int argc, char *argv[]) { int* a; *a=1; return 0; } compiles ok, but throws "Segmentation fault (core dumped)" at runtime why is that? i'm working with gcc in ubuntu. I have been able to compile and run...
  2. S

    Fortran Solving FORTRAN Compiler Issues with Different Outputs

    Hi all ! This is a weird problem. A simple program to read a file and display it works differently when compiled with different versions of the same compiler. When I compile it as: garbageij@garbageij:~/NMA$ mpif90 exp4.f90 and run it, it gives the correct output. But when I compile it as...
  3. B

    Fortran Fortran on ubuntu using f95 code help

    I have the following code with error- I want this general flow. Errors I get are missing ')' at the do while line, syntax error on the line started with ****(not part of program added after fact) and expecting END Program statement at line end do counter=1 user_reaction =3 do while (counter...
  4. H

    MATLAB Matlab code for 2D inverse Fourier transforms

    I have written some routines that compute the 2D inverse Fourier transform, if anyone thinks that this may be useful at all then please let me know and I will gladly post the code.
  5. K

    Mathematica Mathematica: Need help to modify the code

    Hi all, I need help to edit the code so that the arrangment of the outputs match the one that Iam looking for. For instance: term[n_Integer, m_Integer] := Apply[Dot, Table[matg[[i]], {i, m + 1, n}]].hl[[m]] /; (n >= m); Subscript[lay, s_] := Sum[term[s, i], {i, s}]; In[1]...
  6. H

    Writing Finite Element Code for Structural Analysis

    Structural Analysis-Writing Finite Element Code, Dear all, I have written a code ( in fact it is a software) for 3D finite element structural analysis. While developing the code I found that assembling global stiffness matrix is quite complicated. The complication is even more when we...
  7. J

    Fortran Solving System of Equations with Fortran Code

    we have to write a code to solve system of equations by writing them in matricies (tridiagonal matrix) form ... the first step is to enter the coefficients of the variables (r1,r2,r3,...) and then the answers to the equations (b1,b2,b3,...) by using array , and print the equations in the form...
  8. L

    Troubleshooting Code Blocks: 'Hello World' Won't Stay!

    I just began a course on computer science and we're to use Code Blocks as the program to use, but I can't get the darn thing to work. The built in simple program called "hello world" is supposed to have a black window pop up that says "hello world", but the window pops up and disappears and I...
  9. R

    Good html website code templates?

    I'm trying to fix up my dads website but the old version seems to have been made using some sort of WYSIWYG editor so the code is completely senseless and complicated. So I think it would be quicker to start and just re make the website from the ground up but I haven't got the time to fiddle...
  10. M

    Fortran Compiling a Fortran 77 Code on Ubuntu

    Hi, I have a fortran 77 code, I compiled it on cygwin in windows 7 by using f77 and gfortran, and it has been working correctly. I should use this code on Ubuntu, so I installed f77, gfortran and gcc compiler. I tried to comile that code by using f77 but it gave me the following error: > f77...
  11. M

    Code for finding the lift coefficient of NACA

    I'm trying to code a method to find the lift coefficient of a NACA airfoil using panel method. (Coding mentioned below is MATLAB) There are two things I am stuck at: 1) Finding the coordinates of NACA Usually we use the given general formula for camber. However as we all know, if we...
  12. J

    Mathematica Help in Mathematica code for solutions expansion of differential equations

    I need to NDsolve four differential equations. But I find my code does not work. Who can give me some suggestions? Thanks!
  13. D

    C/C++ C++ help- my code reads from small files but not large

    Hello, I'm trying to make part of a code that reads a csv file with data containing the date and time, and the wind speed at that time, then does various output things. When I copy and paste 1000 entriesinto a csv file and ru it, it works great, but if I use the file that's about 6,000kb it...
  14. J

    (15,11) Hamming Code, too work out how to calculate check digits

    Homework Statement I need to figure out how to find out the amount of check digits in a (15,11) hamming code. I know the amount of check digits is four and the amount of information digits is 7 but I don't know how to figure out how to get the answer, I only have the answer. Homework...
  15. N

    Fortran Fortran code error: forrtl: severe (66)

    Hi everybody, I have old Fortran code, originally written in the mid 1970's for an Elmer system. The code has been adapted through the years, last run successfully in 2009. The code has now landed on my lap after having been "retired" due to obsolescence. I am a pure Fortran beginner...
  16. R

    How can Yee's algorithm and PML ABCs be used to detect breast cancer?

    Hi everyone, new to the forum and new to fortran. my coding skills have never been my strongest point and I'm struggling to understand the code from start to finish. If anybody can help me, i would appreciate it very much. Basically the code is used to detect breast cancer using the Yee's...
  17. Square1

    Software Code Examples: Where to Find Them

    Hi. Does anyone know of any places where I can get the code of some notable notable software, or parts of it, even if it's old? Or is this totally unlikely.
  18. E

    LC-3 Assembly Code Error detection

    Homework Statement What is wrong with the code fragment: .ORIG x3000 AND R0,R0, #0 AND R2,R2, #0 ADD R2,R2, #7 JSR SUB ADD R2,R2, ASCII ADD R0,R2,#0 TRAP x21 SUB ADD R2,R2,#9 ADD R7,R7,#1 RET ASCII .FILL x0030 .END The Attempt at a Solution Ok, so first we ckear some...
  19. S

    Fortran Fortran: all lines of the code are not being read

    hello, i'm a beginner in programming. i wrote a program to calculate velocity correlation function. i do not get any compilation errors but the lines after line number 42 are not being read. could someone tell me what is it that I'm doing wrong? thanks a lot! svartak !program to...
  20. N

    The code work in windows system but does not work in linux

    It looks like dead loop when it is running on linux system. It works perfectly in windows. #include <stdio.h> #include <stdlib.h> #include <math.h> #define NF 10 //total number of data. /* function prototypes */ double gaussian( void ); int main() { int i; double...
  21. N

    Testing RAM on Board using Machine Assembly Code

    I'm currently taking a Microprocessor course and we are adding to our breadboard week by week. The most recent add on was a UT6264CPCL RAM chip. Other chip specifications are given below in in 2. Homework Equations . My question is, how do we test to make sure that the RAM is working using two...
  22. D

    Help with errors in my BinaryTree code

    Mod note: I added [ code ] and [ /code ] tags. Homework Statement I am having touble with errors in this code and honestly I have nothing on why it does not work so if anyone can help it will be much appreciated! The errors are in the BinaryTree class I will bold the mistakes in the program...
  23. M

    Probability distribution pin code guessing

    Homework Statement What is the distribution of stochastic variable X = "the number of attempts needed to find the correct last digit of a pin code" Homework Equations The Attempt at a Solution I thought it was like this: P(X=1) = 1/10 P(X=2) = 9/10*1/9 P(X=3) = 9/10*8/9*1/7...
  24. I

    Code for 2 dimesional Newtons method.

    Hey, I'm trying to figure out how to do Newtons method in 2 dimensions. That is, I want it to take in an input of my initial matrix {x0,y0} and then follow the algorithm to find the solution to f1(x,y)=0, f2(x,y)=0. The algorithm is {x1,y1}={x0,y0}-A^-1*F{x0,y0} where A is the matrix of mixed...
  25. MacLaddy

    LaTeX Is there a way to practice Latex code without posting on forums?

    I have noticed recently that I will struggle with a math problem for hours, sometimes days, and then within five minutes of posting I will realize my error and resolve it myself. I think it has something to do with the crafting of the Latex code, previewing, repairing, previewing again, changing...
  26. D

    MATLAB Altering Matlab Code for a Logistic Map Cobweb Plot

    I found some Matlab code that works. However, I am not sure how to alter it for my needs. How can I make the code work for this:##N_{t+1} = \frac{(1+r)N_t}{1+rN_t}##What needs to be changed? %%% MAKES A COBWEB PLOT FOR A LOGISTIC MAP % compute trajectory a=3.0; % parameter x0=0.2...
  27. F

    What is wrong with this matlab code?

    Write a user-defined MATLAB function for the following math function: y(t) = -0.2x^4 + e^(-0.5x)*x^3+7x^2 The input to the function is x and the output is y. Write the function such that x can be a vector Use this function to make a plot of the function y(x) -3≤x≤4 function y=chp7one(x)...
  28. P

    Fortran Why is My Fortran Code Not Working?

    I'm new in programing. Does enybody knows why this don't work. implicit none integer i,N,Ntot,istag real*8 t,U,tpin,k,eg,mstag real*8 rho,Umstag,Urho real*8 eaf,eaftot,lambdaminus write(6,*) 'N,Ntot,t,U' read (5,*) N,Ntot,t,U write(36,*) Ntot/2+1 tpin=8.d0*datan(1.do)/dfloat(N)...
  29. M

    Strange indexing in Fortran Code

    Hi all, I am totally new to fortran. I have to convert a code that is actually written in the fortran to matlab. There is only one subroutine that is totally mysterious for me. I am posting the part of code I have problem with, below: 1. subroutine...
  30. W

    Freedom or aligators use switches for code.

    I was wondering if anyone had seen this logic problem in a different form or knows how a solution to this. Thanks Freedom or Alligators Once upon a time, a prison warden was responsible for 22 prisoners on Death Row. These prisoners were students who had done terrible things: some illegally...
  31. Jameson

    LaTeX Uncovering the Source: How to View Latex Code in Mathjax Images

    It's strange no one has noticed but after reading through the Mathjax documentation guide, all you have to do to view the source code is right click over any Mathjax image and click "Show Source". A new window will pop up with the Latex code. Jameson EDIT: Try it here $ \displaystyle...
  32. G

    Need a code to construct an antisymmetric tensor with Mathematica 6.

    Hello! I'm doing a code in Mathematica 6.0 in order to calculate a contraction of indices with the Levi-Civita tensor (in six dimensions) and an antiSymmetric tensor A[m,n,p] (it has 3 indices running from 1 to 6). For example in order to turn A into an antisymmetric tensor, I wrote something...
  33. A

    MATLAB Help with writing a matlab code

    ?hi, im trying to write a code that should do this- create a random sized zeros vector create a random size ones vector i have to do this several times and combine it all(by that order) into one vector that should lookz like- 0000011111001111001... does anybosy have an idea how to do it...
  34. Monique

    Command /bin/sh failed with exit code 2

    I'm trying to build code in Xcode, but I keep getting the following error: xcodebuild[17565:903] Unexpected character / at line 1 xcodebuild: error: Unable to read project 'VTK.xcodeproj'. Reason: Project ../VTK.xcodeproj cannot be opened because the project file cannot be parsed. make...
  35. V

    MATLAB How to write this code in matlab?

    M0=100; var0=100; i=1:478 j=1:448 if(temp(i,j)>M) G(i,j)=M0+sqrt(double((var0*power((temp(i,j)-M),2))/V)); else G(i,j)=M0-sqrt(double((var0*power((temp(i,j)-M),2))/V)); Where temp(i,j) is an matrix. This code is not working. I am...
  36. M

    MATLAB Matlab code used for vehicle dynamics

    Please help me recognize what is wrong with this professor supplied code... clear all options=odeset('events', @events_passing) [t,z]=ode45(@passing,[0,10],[0,50*88/60],options) plot(t,z) function [value,isterminal,direction]=events_passing(t,z) value=z(2)-88; isterminal=1...
  37. Q

    Resistor overheated and melted color code, how do I determine type?

    I am trying to repair this device and have determined that the issue is with this melted resistor... In order to find the correct replacement i need to determine specifically what resistor this is.
  38. C

    Fortran Having some issues with a piece of fortran95 code

    Hello, I am pretty new to programming at all and am having some issues with working out why this program is not compiling: Program MAIN DO J = 1, 11 K = 10 + J P = 0.4 !POSITION OF MAXIMUM CAMBER AT 40% CHORD! M = FLOAT (J + 1)* 0.01...
  39. ChristinaJ

    Job Skills CV/Resume: Should I include a QR code?

    Should I include a QR code in a CV? Potentially useful, but maybe it could be construed as being a little pretentious. Any thoughts?
  40. Z

    C/C++ Learning C++ by reading the code of open source projects?

    learning C++ by reading the code of open source projects? Is there any resource that teaches C++ by taking an open source project (at the level of quake 3 for example)and explains the code step by step for some one who only knows the very basics . In my opinion It will be very efficient . I can...
  41. S

    Mathematica [Mathematica] How to use this code?

    I have a notebook with the following code in it: GratingFrame[n_, c_, k_, \[Theta]_, \[Phi]_] := Graphics[Raster[ Table[0.5 + 0.5 c Cos[ 2 Pi k (i Cos[\[Theta] Pi/180]/n + j Sin[\[Theta] Pi/180]/n) - \[Phi] Pi/180], {j, 1, n}, {i, 1, n}]]]...
  42. C

    Fortran Errors with fortran code, help

    Hii, Having trouble with some code I am writing, where a subroutine returns the same value regardless of different variable inputs. ... C Calculate Yth and Chi values. Compute sum of Chi-squared. Subroutine Chisquared(CPREV,CHISQ) Real...
  43. A

    When run the code below:[code]void F(){

    When run the code below: void F() { F(); } EStackOverFlow will appear. The book says that there is a loop going on. Can anyone explain to me? Because I think in the Void F function, it will only use itself once.
  44. J

    ADC INL/DNL code density testing help

    Hi Guys, Could you please help me on the derrivation of offset and amplitude formula being used in the computation of ADC INL and DNL using code density testing. below are the formulas. Appreciate any help. Regards.
  45. K

    How to write appropriate ide opl code (using cplex) for this algorithm

    im a new user of cplex and now I am having difficulty to transform this algorithm into cplex code. im using ilog cplex optimization studio12.2. my problem is i have several customers, several periods, one depot and i want to distribute some amount of goods to the customer using several...
  46. R

    Java Good Java IDE with code complete?

    I've been learning C# but just want to give Java a go before I start learning the difficult bits of C# to see which I prefer, most people say the 2 languages are very similar but I just wanted to see for myself. I really like having a code complete function in the IDE but I tried Netbeans but...
  47. Y

    Assembly code not running - debug help

    Homework Statement Hello all, I need to implement iterative (non-recursive) binary search in assembly. The array has 10 elements, starting from 0x10000100, in address 0x10000004 there's the element to search for, and the answer should be put in address 0x10000008 It should be for MIPS and I...
  48. J

    How can I translate this mips code into binary/hexadecimal

    Hello I have two doubts, In an exercise I have to convert a MIPS instruction into hexadecimal code. I understand a part of it. The instruction given by the professor is: Exercise 2 : bne $t2, $zero, previous instruction The solution is Co =0b0 00101, $rs =0b0 1010,$rt =0b0 0000, Imm16 =...
  49. R

    MATLAB Problem regarding Matlab code for n no of quantum well

    I have written a code which is something like that clc X = input('Molefraction of Al in system:'); n=input('no of well:'); width=zeros(1,50); for j=1:(2*n+1) width(j,:)=input('length of areas:'); end del_eg=1.247*X; V1=0.6*del_eg; V=zeros(1,100); for j=1:n...
  50. G

    MATLAB How to write Matlab code for a multivariate Beta distribution

    Hello, I am working on a problem in which I first sample two unknown probabilities, p and q, from Beta distributions, and then I want to sample both of them at the same time from a multivariate Beta distribution. This is the code that I have for sampling p and q individually from Beta...
Back
Top