Code Definition and 908 Threads
-
Computer code that handles the periodic table of elements
Hi guys When I ran the Chemical Equilibrium Code from NASA (grc.nasa.gov) to predict the products of a chemical reaction and their concentrations, it says it does not handle certain elements in the database from the periodic table. Is there a computer code that predicts the products of a...- Adrian Tudini
- Thread
- Code Computer Elements Periodic Periodic table Table
- Replies: 5
- Forum: Chemistry
-
R
What's the point of having a dress code stricter than business casual?
Nowadays a lot of people like to fashion themselves in a way that is less traditional. You might see men wear make up or men and women coloring their hair some color that isn't naturally possible. Since society is so free, even among serious scholars (as I see in my department), what is the...- random_soldier
- Thread
- Business Code Point
- Replies: 53
- Forum: General Discussion
-
Why my code sometimes prints trash and other times not?
#include<stdio.h> #include<math.h> #include<complex.h> int main(){ float complex a,b,x=2,y,z; printf("Write the real part followed by the imaginary part of your complex number: \n"); scanf("%f %f",&a,&b); z=a+I*b; printf("z= %f + i%f\n",creal(z),cimag(z)); y=cpow(z,x)...- GustavoGG
- Thread
- Code
- Replies: 4
- Forum: Programming and Computer Science
-
D
Structure of code for ODE solution in Octave
The problem of interest at the moment is the solution of a simple damped oscillator problem, xddot+2*zeta*wn*xdot+wn^2*x = 0 Everything seems to work fine provided I include the values of zeta and wn inside the function that defines the derivative values. But zeta and wn are actually calculated...- Dr.D
- Thread
- Code Octave Ode Structure
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
H
MATLAB My Crank-Nicolson code for my diffusion equation isn't working
I'm trying to solve the diffusion equation in spherical co-ordinates with spherical symmetry. I have included the PDE in question and the scheme I'm using and although it works, it diverges which I don't understand as Crank-Nicholson should be unconditionally stable for the diffusion. The code...- hunt_mat
- Thread
- Code Diffusion Diffusion equation Matlab code Spherical
- Replies: 41
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Mathematica Wolfram Cloud Notebook : Indenting Code
I tried adding spaces manually to indent a multiline code block in a notebook on Wolfram Cloud (www.wolframcloud.com). It throws the "Set: Tag Times" error. How can I indent code lines (preferably manually, but auto will also be fine).- Swamp Thing
- Thread
- Cloud Code
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
The Story behind the Apollo 11 and the 1202 Computer Error Code
- jedishrfu
- Thread
- Apollo Code Computer Error
- Replies: 23
- Forum: Computing and Technology
-
MATLAB MATLAB Code For Analyzing Experimental Data
Hi! I'm working on MATLAB code to analyze dat for a specific project, but I'm curious if it could made useful for more general purposes. Here's a bit of background on the project: I'm an REU student and I was assigned to analyze data for a recently conducted experiment. The experiment took...- person123
- Thread
- Code Data Experimental Experimental data Matlab Matlab code
- Replies: 12
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Python Best VS Code Themes: Light & Dark Modes, Python IDLE Colors
I am searching for VS code themes that is in light or in the dark mode the codes will have different colors such as colors in python idle. Any suggestions ? Thanks- Arman777
- Thread
- Code
- Replies: 1
- Forum: Programming and Computer Science
-
R
I Generating Irrational Ratios in Wave Simulations
I am trying to write an algorithm that generates two random numbers in a given interval such that their ratio is an irrational number. I understand that all numbers stored on a computer are rational, so it is not possible to have a truly irrational number in a simulation. So, instead I am...- roam
- Thread
- Code Irrational Irrational number Irrational numbers Matlab Number theory Numbers
- Replies: 6
- Forum: General Math
-
F
Coding theory: Find the right code word
Error correction can be performed on 1010101 after reception, i need to find the right code <br> i know that the polynomial for the received code is $$x^6+x^4+x2+1$$ when i try to find the error pattern,by long division, $$r(x)/g(x)$$ the remainder is $$z^2+z^2+1$$ xor $$z^2+z+1$$ so the...- fiksx
- Thread
- Code Coding Theory
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
B Is spacetime a quantum error correcting code?
This is a fascinating discussion. I know some people don't want to debate this or they can't debate it but the truth doesn't care about your feelings. This isn't speculative, it's backed by Scientific research. First paper. Is Spacetime an Error Correcting Code. Published in the Journal of High...- platosuniverse
- Thread
- Code Computable Error Quantum Quantum computer Spacetime
- Replies: 2
- Forum: Quantum Physics
-
Explaining the Source Code for Calculating Stationary Distribution in R
Summary: Kindly explain the source code in R which meant for calculating stationary distribution of a transition matrix. I am trying to understand the following source code meant for finding stationary distribution of a matrix: ### Stationary distribution of discrete-time Markov chain ###...- user366312
- Thread
- Code Explanation Source
- Replies: 3
- Forum: Programming and Computer Science
-
What is the purpose of using the mod operator in this line of code?
#================================================================== # Build the transition matrix for random walk on n-cycle #------------------------------------------------------------------ n <- 25 # we are creating (nXn) transition matrix r1 <- c(0, 1/2, rep(0,n-3), 1/2) # create same...- user366312
- Thread
- Code Explanation Source
- Replies: 1
- Forum: Programming and Computer Science
-
Animation using matplotlib query
I am trying to animate a plot of two distinct points (blue and green points) moving about the complex unit circle using Python's Matplotlib library. The problem I am having is that the animation does not remove and update the previous data points but rather sequentially smears it on the unit...- Danny Boy
- Thread
- animation code matplotlib python
- Replies: 1
- Forum: Programming and Computer Science
-
MPI parallel code speed-up sucks
Hey guys, I parallelized my code, written in C++, with the MPI library. Unfortunately, the speed-up I get saturates at x6, with increasing number of cores. Whereas, in theory, the speed-up should really be nearly linear. To understand where the bottlenecks come from, I drilled down the code to...- davidfur
- Thread
- C++ Code Parallel
- Replies: 3
- Forum: Programming and Computer Science
-
Java Why is this Java code not working?
Hello all: I am reading a comutacomputa physics book and trying a code from it in MATLAB it is not working and due to my lack of knowledge in this field I can't see where is the mistake hope you can take a look import java.lang .*; public class Motion { static final int n = 100000, j =...- hagopbul
- Thread
- Code Java Matlab Matlab code
- Replies: 7
- Forum: Programming and Computer Science
-
S
Large datasets - how to handle / alternatives
Hello, I am trying to do the following: I have two inputs that are very large files - I extract the first column of each so I have two vectors of ~2-5mil by 1. This is timing information. The goal is to extract the indices of each vector where the time in one vector is within a certain...- SKT_90
- Thread
- Code Matlab
- Replies: 22
- Forum: Programming and Computer Science
-
Microsoft Release the Calc.exe Source Code
in this article on Ars Technica, Microsoft has released the source code to the Calc.exe app calc.exe is now open source; there’s surprising depth in its ancient code https://arstechnica.com/gadgets/2019/03/calc-exe-is-now-open-source-theres-surprising-depth-in-its-ancient-code/- jedishrfu
- Thread
- Code Release Source
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Proper simulation code for a Nuclear Reactor core
Hi, I want to make a simple nuclear reactor core simulation to calculate the thermal power production. Is there any open source code with interface (or not) that you recommend to use? The core have cylindrical shape with Uranium( up to 90% enriched) molybdenum fuel,Beryllium reflector and one...- Dimitris Catzis
- Thread
- Code Core Nuclear Nuclear reactor Reactor Simulation
- Replies: 26
- Forum: Nuclear Engineering
-
W
Python What condition is this code testing for (Python 3.7)
Hi, I am taching myself Python 3.7.2. I think I get how 'While True' statements work, but I am having trouble making sense of this. The program runs, but I would like to understand well what is the condition being tested. (From 'Automate the Boring Stuff with Python) We have a dictionary of...- WWGD
- Thread
- Code Condition Testing
- Replies: 18
- Forum: Programming and Computer Science
-
Electronics How does this Adruino Code Work?
Following up on my previous thread, I found a project that I can do for this Arduino. Its really just a little synthesize keyboard thing, but I'm wondering how the code works. Kind of just the logic behind it. I know that some of the stuff at the bottom deals with tones and frequencies and...- opus
- Thread
- Code Work
- Replies: 7
- Forum: DIY Projects
-
D
I am trying to build a radio to transmit Morse code
I am trying to build a radio to transmit morse code. I have built A wien bridge oscillator on a breadboard. I think the wien bridge Oscillator works. How long should The antenna be?- David lopez
- Thread
- Build Code Radio
- Replies: 16
- Forum: Electrical Engineering
-
J
MHB Guessing a three digit pin code from an 8 key keypad
Hello, the problem is as follows. I'm not sure if it is a permutation or combination problem. It says if a thief steals and ATM card and must randomly guess the correct three digit pin code from an 8 key keypad. Repetition of digits is allowed. What is the probability of a correct guess on the...- jridgeman99
- Thread
- Code Pin
- Replies: 2
- Forum: General Math
-
A
LaTeX What is the LaTeX code for large brackets and parentheses?
What is the latex code used in this forum of large bracket (and parenthesis) and subscript and superscript? For example, the below parenthesis is too small: ##(x1 + \frac{1}{\frac{1}{x1}})##- askor
- Thread
- Code Latex
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Executing code, which statements are true?
Homework Statement Question 1: def convert(degrees): degrees += 273.15 return degrees degrees = 10 print(convert(degrees)) Which of these statements are true after the code executes? (There may be more than 1 correct answer) a) The value of degrees in the main namespace is 283.15...- hnnhcmmngs
- Thread
- code computer science program
- Replies: 23
- Forum: Engineering and Comp Sci Homework Help
-
R
Unexpected error while running hello world code on vs studio
Homework Statement : [/B]Write a C program to print hello world 2. The attempt at a solution: I am completely new to programming. I am learning C at present. In my college, we use linux. Since my pc has windows installed so I am using cygwin terminal to use linux commands from windows. I am...- randomgamernerd
- Thread
- Code Error Hello Hello world Running
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
Our understanding of the laws of the genetic code?
I just did my morning exercise while listening to a short youtube talk on genetics. I do not understand it but what struck me was it seemed to be on the level of an EE discussing OHM's law, Transistor theory, and digital logic terms. Now I know all the rules that make my PC on which I am...- Suppaman
- Thread
- Code Genetic code Laws
- Replies: 11
- Forum: Biology and Medical
-
C
How can I optimise my N-body Simulation code further?
Homework Statement I wrote a brute force O(N^2) N-body code in python and I am not happy with its performance despite the fact that I have cythonised the calculation heavy parts as well as implemented MPI. I am currently out of ideas for how to optimise it further, can I get some advice...- Chaoyi Zhang
- Thread
- Code N-body simulation Simulation
- Replies: 1
- Forum: Advanced Physics Homework Help
-
J
Comp Sci Help with solving first order ODE using a simple Fortran code, please
I am trying to solve the following first order ODE using a simple Fortran code : $$ ds/dt=k_i * \sqrt{v}$$ where both (ki) and (v) are variables depending on (h) as follows $$ k_i=\sqrt{χ/h^2}$$ $$v= \mu h$$ where (μ) and (χ) are constants. (the arbitrary values of each of them can be seen...- joseph2015
- Thread
- Code First order Fortran Ode
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB Code: Stationary Schrodinger EQ, E Spec, Eigenvalues
Hello everyone, For weeks I have been struggling with this quantum mechanics homework involving writing a code to determine the energy spectrum and eigenvalues for the stationary Schrodinger equation for the harmonic oscillator. I can't find any resources anywhere. If anyone could help me get...- Baynie
- Thread
- Code Eigenvalues Harmonic oscillator Matlab Matlab code Schrödinger Schrodinger equation
- Replies: 1
- Forum: Advanced Physics Homework Help
-
Auto/Motor Toyota paint code -- Here is where to find it on the vehicle
Today i learned where to find the Toyota paint code. It's on the VIN sticker which is on driver's side doorjamb. Bottom left corner of the sticker has a "T/C" followed by a 3 character code. If anybody needs some touchup paint for a gray Toyota with code 1H5 i have a fresh 1 oz vial that i will...- jim hardy
- Thread
- Code Paint Vehicle
- Replies: 3
- Forum: DIY Projects
-
P
Newbie questions about the NEC code and flexible "dry use" metal conduit
This is only my second post and I pray it is deemed on topic. This forum has given me a lot of insight however a forum search left me without answer here. Most likely because you are all WELL above my knowledge level. I'll try to make this short and again pray I'm on topic.. I live in florida...- PhysicsFreak321
- Thread
- Code
- Replies: 16
- Forum: Electrical Engineering
-
Calculators Morse code embeded in Software applications
Do you feel it is useful to embed Morse code in specific software applications? Thanks & Regards, Prashant S Akerkar- prashantakerkar
- Thread
- Applications Code Software
- Replies: 5
- Forum: Computing and Technology
-
Z
How to Manually Test Solidity Code Converted into F-star?
Hi, I read a research paper for verification and validation of solidity code. It uses F* (F-star). However, it has to convert the solidity code into F-star. I can't find the converter. Can some body please guide me how to manually test the code? Code is given below: contract MyBank {...- zak100
- Thread
- Code Test
- Replies: 2
- Forum: Programming and Computer Science
-
How exactly do computers execute code?
one thing that has always miffed me is how is it that the hardware carries out the coded instruction. the code is 1's and 0's, and if I have understood anything. 1's and 0's are on and off. but how is the computer flipping the circuits on and off? something must tell it to do that. but then what...- grandpa2390
- Thread
- Code Computers
- Replies: 18
- Forum: Programming and Computer Science
-
R
MATLAB Finite element skeleton code for matlab
Hello, Does anyone know if a finite element skeleton source code exists. Finite element can be used for structural memebers, gas dynamics, etc. But the over all stepping software is the same and then just input the core equations. My application is for pseudo one dimensional compressible...- rppearso
- Thread
- Cfd Code Element Fea Finite finite element Matlab Matlab code
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
What is the ASCII code an ultrasonic sensor will output?
Problem statement For an ultrasonic sensor (MB7380) sending 8 data BITS, no parity and one stop bit, what is the ASCII code it will give for a certain distance like 0.15 meters (0.5')? maxbotix.com/documents/HRXL-MaxSonar-WR_Datasheet.pdf#page=2 Attempt at a solution I do not know how to...- adamaero
- Thread
- Arduino Code Digital electronics Output Sensor Ultrasonic
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
S
Finding errors in a section of microprocessor assembly code
Hi guys, apparently I've got both a linear and a subroutine programming error in the code below from lines 20-35? Could someone point me in the right direction. I think one might be the 'CALL wait' instruction, which should be 'CALL delay'? Not really sure as new to this, any help would be much...- SJC1981
- Thread
- Assembly Code Errors Section
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
T
MATLAB Convert R Code to MATLAB for Detrended Cross Correlation Analysis
Homework Statement I would like to convert this R code into matlab. This code perform a calculation of beta coefficient based on Detrended cross correlation analysis. Homework Equations require(tseries) require(fracdiff) require(matrixStats)DCCA_beta_avg<-function(y,x,smin,smax,step){...- Tilfani
- Thread
- Code Convert Matlab Matlab code
- Replies: 9
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
B
Non-negative matrix factorization code
Hello, I'm looking for the non-negative matrix factorization (NNMF) source code. I checked several linear algebra libraries (e.g., LaPack, mkl), but it seems that this subroutine is not available. Does anyone know where I can find this source code...- buupq
- Thread
- Code Factorization Matrix
- Replies: 1
- Forum: Programming and Computer Science
-
P
Frenkel/Smit: Exercise 10 - MD NVE Code, PBC
Homework Statement I am working on a MD code (http://www.acmm.nl/molsim/frenkel_smit/Exercise_10/index.html) which uses the position Verlet algorithm to integrate the equations of motion and a velocity rescaling algorithm for initialization in periodic boundary conditions. I wondered why...- picat
- Thread
- Code Exercise Molecular dynamics
- Replies: 1
- Forum: Advanced Physics Homework Help
-
S
Constructing K-Maps & Gray Codes w/ 2, 3 & 4 Bits
I know how to construct a Gray code for k-maps with 2 bits, 3 bits, and 4 bits. I also looked at the Wikipedia page for Gray code that explained how to construct an n-bit Gray code from the Gray code for n - 1 bits. What I’m still confused about is where to place the bits. Should the bits be...- Schfra
- Thread
- Code
- Replies: 1
- Forum: Electrical Engineering
-
Question about running "executables" without source code
I have a simple question I guess, basically by how classes etc are formed. In general a class in C++ has some categories such as private, public and protected, which okay everyone knows/can find what they are meant for. E.g. a private member will not be accessible outside the class member...- ChrisVer
- Thread
- Code Running Source
- Replies: 2
- Forum: Programming and Computer Science
-
Open source adaptive mesh code
I want to start a project that requires parallel code for adaptive mesh refinement. I don't want to re-invent the wheel, and was hoping to leverage an open source library as a starting point. Does anyone have experience with any of these codes and could make a recommendation? At this point I...- phyzguy
- Thread
- Code Mesh Open source Source
- Replies: 1
- Forum: Programming and Computer Science
-
What should be the rules to write excellent code?
Hi. I know few rules that let's me write great code: 1. "don't pollute the global namespace" when I sit down to write JavaScript code. 2. SOLID 3. KISS 4. Liskov's Open-Closed principle Can someone help me complete the list of such rules? Thanks! Have a great day!- pairofstrings
- Thread
- Code Programming Rules
- Replies: 30
- Forum: Programming and Computer Science
-
Converting a DFA to efficient code?
I've created a DFA for a game character's dialogue. I could probably code this using "if, if else, for, while" statements, but I feel like this would be impractical since there are about 20 states with 4 different inputs each. Any ideas on how I could make this work? I would really like to...- kolleamm
- Thread
- Code Dfa
- Replies: 4
- Forum: Programming and Computer Science
-
MatLab Code for Baseball Not Working
Homework Statement I am trying to create this plot in MatLab I'm starting out doing the simplest one, no drag, no wind. simple kinematics, right? but I can not get my code to run. Homework Equations Kinematic Equations The Attempt at a Solution close all clear all clc %%defining variables...- grandpa2390
- Thread
- Baseball Code Matlab Matlab code
- Replies: 27
- Forum: Introductory Physics Homework Help
-
Why Won't My Matlab Code Work?
Homework Statement I need to write a program in Matlab that accomplishes this graph: I keep getting an error on Line31 Column 161 about unexpected parenthesis. They look balanced to me. If I take one away from either side, I get an error that I am short a parenthesis. I also need to change...- grandpa2390
- Thread
- Code Matlab Matlab code Work
- Replies: 12
- Forum: Introductory Physics Homework Help
-
C
Python Weights and interpolation -- Replicating Python code with hand calculations
Hello everyone. I have a Python code which calculates, given a continuos uniform random variable U(-1,1), the order of a interpolation polynomial and a set of points the evolution of a function of this random variable. i.e. v0 = cp.Uniform(-1,1) t = np.linspace(0, 10, 10) order=1 . . . plt.plot...- confused_engineer
- Thread
- Calculations Code hand Interpolation Python
- Replies: 6
- Forum: Programming and Computer Science