Code Definition and 908 Threads
-
LaTeX Latex Code for One Set Minus Another .... .... A\B .... ....
Recently I posted the following text on the Analysis forum ..." ... ... In order to demonstrate that $$K$$ is closed, we prove that $$\mathbb{R}^n\K$$ is open. Indeed, choose $$y \notin K$$ and define $$O_j = \{ x \in \mathbb{R}^n \ \mid \ \mid \mid x - y \mid \mid \gt \frac{1}{j} \}$$ for...- Math Amateur
- Thread
- Code Latex Set
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB Help with MATLAB music code | Signals & Systems
For my signals and system class were creating music. I am given a structure with three variables, frequency/notes, duration, and pulse. ex: frequency(in note numbers which i then convert to frequencies)[44 45 47 50...]. duration[2 1 1 3 4...] with pulse duration being .25s and pulse[1 3 4 5 8...- physics4353
- Thread
- Code Matlab Matlab code
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
LaTeX Latex Code for a Parenthesis ....
In a recent post on the Cauchy-Schwarz Inequality I wished to "size" the parentheses adequately in the expression $$x = \frac{ \langle x, y \rangle }{ \mid \mid y \mid \mid^2} y + ( x - \frac{ \langle x, y \rangle }{ \mid \mid y \mid \mid^2} y ) $$... ... but in order to use \left and \right...- Math Amateur
- Thread
- Code Latex
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
Python Porting Python Code to Fortran for Parallel Computing
I have a simulation that involves a lot of dense linear algebra with a lot of complex arrays, that was written in python's numpy and then sped up with cython. Unfortunately I'm stuck with python's GIL (global interpreter lock), which prevents the use of numpy with multi-threaded code. I'm...- SevenThunders
- Thread
- Code Computing Fortran Parallel Python
- Replies: 14
- Forum: Programming and Computer Science
-
Fortran Transport Equation code, Fortran77
Hi. I have written a code to solve the one dimensional one group (a fixed velocity is considered for the particles) time independent transport equation. The code uses the ##S_N## discrete ordinates method, a Gauss-Legendre quadrature in the angular directions, and a Diamond Difference formula...- Telemachus
- Thread
- Code Fortran77 Transport
- Replies: 2
- Forum: Programming and Computer Science
-
Python What's wrong with my bisection method code?
Hello, I am assigned to write a code using bisection method (aka binary search method) The equation is 10sin(x) - x^3 - N where N = 1,2,3,4,5,6,7 My code is from math import sin def neg(a, b): return a*b> 0 def bisectx(funcx, lowx, highx,n): assert not neg(funcx(lowx,n), funcx(highx,n))...- Hi Im Paul
- Thread
- Bisection method Code Method Physcis Programming Python
- Replies: 11
- Forum: Programming and Computer Science
-
C
MATLAB Help: Convert Matlab to Python code
I'm working on a convolutional neural network project that classifies histopathological images of breast tumors. All my code is in python. Part of the image preprocessing involves appearance normalisation to account for the variation in histological staining. The only code for the preprocessing...- CrazyNeutrino
- Thread
- Code Convert Matlab Python
- Replies: 17
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Semi-synthetic organism with an expanded genetic code
All life on Earth stores its genetic information in DNA using just four nucleotide letters: A, T, C, and G. Research published this week in the journal Nature describes how scientists engineered a bacterium to incorporate two new letters into their DNA (which they call X and Y, pictured below)...- Ygggdrasil
- Thread
- Code Dna Genetic code News Organism Synthetic biology
- Replies: 8
- Forum: Biology and Medical
-
D
LaTeX Sample problems; Simple Limit (Epsilon - Delta proofs) Latex code included
Remember to use the appropriate packages; these are in similar post if a mod wants to add the link if you choose to use Latex. Here is the PDF \begin{document} \begin{center} {\LARGE Epsilon-Delta Proofs \\[0.25em] Practice} \\[1em] {\large Just for practice, don't use Google to cheat!}...- DrWahoo
- Thread
- Code Delta Epsilon Latex Limit Proofs
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
D
MATLAB Matlab Sim Code for ODE & Gillespie for Reversible Reaction
Here is the code you input into matlab. Aini etc, are the initial values of the population densities. A for predator, B for Prey. % example for ODE and Gillespie % one reversible reaction b1 = .033; bo = .00047; a1 = .0022; ao = .00055; Aini = 5168; Bini = 34; %% Basic ODE simulation...- DrWahoo
- Thread
- Code Matlab Ode Reaction Reversible
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Operating system concepts in an app by Linux System calls
Before I begin learning what System Calls, Kernel, and Operating System is, I want to confirm that Operating System concepts like Multi-threading, Concurrency, Parallelism, Scheduling, Memory Management, Process Management, Network Management, Device Drivers can be implemented by using Linux...- pairofstrings
- Thread
- App Code Concepts Kernel Linux System
- Replies: 3
- Forum: Programming and Computer Science
-
D
MATLAB Matlab code for a Gillespie type reaction (model) with wolves and elk.
Copy and paste if you want to use any of this code. Its a simple iteration of converting biomass of elk into new wolves. % example for ODE and Gillespie % one reversible reaction b1 = .033; bo = .00047; a1 = .0022; ao = .00055; Aini = 5168; Bini = 34; %% Basic ODE simulation dt = 0.01...- DrWahoo
- Thread
- Code Matlab Matlab code Model Reaction Type
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Fixing a Matlab Code: Help Needed for Fourier Transform Calculation"
Hi Could you please help me to fix the code below? I know that the code is completely wrong but I have tried to write it down so that you can get an idea what I'm trying to do. Thank you. %%file name fourier.m clear all; close all; clc; f = 0; %% 0 Hz to 100 Hz, with 0.1 step...- PainterGuy
- Thread
- Code Matlab Matlab code
- Replies: 29
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
D
MHB Building thesis or dissertation using package\style code.
The code below is the the main thesis style, know as muthesis.sty; It is a style to allow Title, Signatures, Dedication, Table of Contents, Main Matter (Chapter and Sections), Biblio., and approval letter. Edit it to your liking; just make sure all the files are containted within the same...- DrWahoo
- Thread
- Building Code Dissertation Thesis
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
F
Converting Simulink model to C code, integration
Dear Forumers,Given a simulink model: http://www.femm.info/Archives/contrib/images/TransientLoudspeaker/SimulinkOverview.png I would like to implement fast code for it.I have no access to matlib or simulink at all, so I tried to implement the simulation in C code. Code for the block...- flowwolf
- Thread
- C code Code Integration Model Simulink
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Python How can I integrate sinusoids in python code using FFT?
Hello, Thank you for taking time to read my post. I have a discrete set of data points that represent an acceleration signal. I want to take the integral of this set of points twice so as to get a function which represents the position over time. To accomplish this, I have taken the FFT of the...- jameslat
- Thread
- Code Fft Python
- Replies: 3
- Forum: Programming and Computer Science
-
M
Fortran Fortran Code problems linking to LAPACK library
Hi, I have a main Fortran code (*.f90) which can calculate eigenvalues and eigenvectors using LAPACK library. Unfortunately, i can't excute this program because i can't link it to the library. I'm using Code Blocks as IDE environment. Any help please.- MrElec
- Thread
- Code Fortran Lapack
- Replies: 2
- Forum: Programming and Computer Science
-
LaTeX Share Latex Code Easily: Tips and Tricks
Hi I use Scientific Workplace to write down math equations and also to create documents involving mathematics and to do calculations. Although most people use it for writing science articles, I've found it extremely helpful for whatever little bit of mathematics I do. I face a problem when I...- PainterGuy
- Thread
- Code Latex
- Replies: 16
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
I
MATLAB Small matlab code not working. Why ?
Code is the following : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% xiter=[0.7 20 10]; mubeton=[0.100 0.80 0.70 0.60 0.50 0.25]; muair=[0.05 0.042 0.04 0.032 0.021 0.011]; zl=[5 30 70 100]; fnorm1 = @(d,a0,dmax) (a0*(1-exp(-(0.5*log(d./dmax)).^2))+exp(-(0.5*log(d./dmax)).^2)); fnorm2 = @(d,dmax,DRL)...- imsolost
- Thread
- Code Matlab Matlab code
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
LaTeX Printing Code from Python in Latex via "minted"
Hi PF! I am trying to import code written in Python into Latex via the "minted" package. However, I am getting the error: Package minted error: you must invoke latex with the -shell-escape flag. I tried googling help but I can't figure it out. I'm using Python 2.7 on mac OSX sierra. Any help...- member 428835
- Thread
- Code Latex Printing Python
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
C
A Ikonal equation integration -- source code request
Hi. I would like a source code to integrate the ikonal equation. I would like to compute the ray path. Of course I am able to compute the phase refractive index n(x,y). Cartesian system is preferred. Can anybody give me a suggestion? Bye, Carlos- carlos-carlos
- Thread
- Code Integration Request Source
- Replies: 3
- Forum: Classical Physics
-
Python Why am I getting 'nope' instead of 'works' when using sockets in Python?
Hi everyone, I have just started learning sockets in python and I have made the following code: import socket HOST = '' PORT = 8888 def main(): while 1: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT))...- ShaddollDa9u
- Thread
- Code Python Socket
- Replies: 11
- Forum: Programming and Computer Science
-
Understanding 'C Code' & 'No.' in Buck Converter Regulator Datasheet
I have recently come across a datasheet for a buck converter regulator that uses the terms "c code" and "No." for certain capacitors but when going to the manufacturer datasheets for these capacitors they make no reference to any "c code" or one single number for a capacitor. If anyone could...- Mzzed
- Thread
- Buck converter C code Capacitors Code Converter Electronics Regulator
- Replies: 11
- Forum: Electrical Engineering
-
MATLAB Sample Code for Monte Carlo estimation of pi
Below is the partial code to plot the rejection/accept regions using monte carlo sampling. The context is to estimate pi and plotting is just one part of it. I'm not sure how the ~ symbol can work. scatter(samples(1,~reject),samples(2,~reject),'b.')...- FallenApple
- Thread
- Code Estimation Monte carlo Pi
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
A How to validate a code written for solution of 1D diffusion?
Consider the conceptual model presented in the attached image, of heat conduction in a bar. There is a heat source at left side and heat is observed at point Ho after a distance L from the source. If we consider only heat transfer through conduction then this problem can be modeled by...- Atr cheema
- Thread
- 1d Code Diffusion Heat conduction Heat diffusion Modeling
- Replies: 5
- Forum: Other Physics Topics
-
LaTeX Plain latex code not working in Physics forum
I have written a solution of problem in LYX. I exported the lyx code as latex plain code. I opened the latex plain code in Tex studio and copied it and pasted it in Physics forum and it didn't work. Can anyone please tell me what should I do? Should I again type the latex code here i.e.Physics...- Pushoam
- Thread
- Code Forum Latex Physics
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
D
Which code segment completes this C code?
Homework Statement This is a question from the test i had today in which we had to look at certain C code segments and deduce which code part is missing in order for the program to do what we desire. Part b) was a short questionnaire to test our knowledge about c types and declarations. Part a)...- diredragon
- Thread
- C code C programming Code Homework
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB How to create distinct circles in Matlab?
I want to create a plate of distinct circles on Matlab where their radii are generated by randn(1,p) and centers are random. I am currently doing the circles using viscircles, but some of them are overlapping, and since I want approximately 100 ones, this problem only gets worse. How can I make...- jamalkoiyess
- Thread
- Circle Circles Code Matlab Plane Random
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
R
A DFT Code for Finite-Temperature Calculations
I'm interested in calculating density of states (DOS) and band structures for metals in which the electrons have a finite temperature (up to ~ 3 eV). I've read several papers indicating that the DOS shifts with electron temperature, and that DFT can be used to calculate finite-temperature...- Rod
- Thread
- Calculations Code Dft
- Replies: 1
- Forum: Atomic and Condensed Matter
-
M
LaTeX Efficient Fractional Latex Code for Simplifying Equations
How can this code be coded by another way? ## \frac {300-270.1}{T-130}## = ## \frac {313.-270.1}{135-130}## And it is also very strange that the right side O.K but left side is not but everything is the same for left and right. #,# \frac {300-270.1}{T-130}## = ## \frac...- mech-eng
- Thread
- Code fractional Latex
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
LaTeX How does rendering work in web development?
"You must put special delimiters at the beginning and end of your LaTeX code, in order for MathJax to recognize it and process it. If you want the equation to appear inline with the surrounding text, put # # before and after it. If you want the equation to stand alone in a separate "paragraph"...- mech-eng
- Thread
- Code Latex
- Replies: 14
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
V
Why does not this Erdos-Renyi C code work?
Homework Statement I need to write an Erdos-Renyi random graph, by using the adjacency matrix (or alternatively list) and calculate the fitness of the graph. Definition: G(n, p) is a random graph with n vertices where each possible edge has probability p of existing.Homework Equations The...- valesdn
- Thread
- Algorithm C code C programming Code Graph Modelling Work
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
Review C Code: Find & Resolve Issues in Visual Studio & repl.it
Hi, i wrote a code and annotated it but i have few problems with it. First it won't run on Visual Studio but it runs fine on repl.it online site which uses a C ide. Second, it seems wrong when i input 5 45 6 -4 8 3 It should print out 8 3 but for some reason it misses out on 3. Could you see...- doktorwho
- Thread
- C code C programming Code Programming
- Replies: 47
- Forum: Programming and Computer Science
-
Help w/ C Programming Homework - Create Array & Print All Inputs
Homework Statement I am fairly new to C programming. I need to write a code that creates an array of max 300 numbers, ask the user to input the numbers and then print that array. Homework Equations 3. The Attempt at a Solution [/B] Here is my code #include <stdio.h> void main() { int...- doktorwho
- Thread
- Array C code C programming Code Coding
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
Java Solar system simulator JAVA source code
Hi, I'm developing a very simple solar system simulator for educational purpose. I had taken from wikipedia mass, velocity of planet and applied universal gravitation formula and applied to all celestial corps. It works well, but when I add the moon... the moon is like a planet, rotating around...- sefiroths
- Thread
- Code Java Simulator Solar Solar system Source System
- Replies: 18
- Forum: Programming and Computer Science
-
D
I don't get a reasonable output for my code?
I'm trying to plot the probability of error for the following equation using Matlab software, i want to use the command "trapz" for the numerical integration, the problem is that i get a fine shape for the plot, but the values in the y-axis are wrong, the whole curve should be between 0 and 1.2...- deema_master
- Thread
- Code Matlab code Numerical integration Output
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Plotting the tragectory of an asteroid in MATLAB
I am trying to plot the trajectory of an asteroid in MATLAB using ode23. The only bodies in the system are The Sun, Earth, Mars and Jupiter and their orbital data has been loaded from data files. I have picked arbitrary initial conditions for the asteroid and believe my forces are correct. My...- JayFlynn
- Thread
- Asteroid Code Matlab Ode45 Odes Plotting Solar system
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
How to Identify Prime Numbers Using Eratosthenes in C#?
Mod note: added code tags using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { List<int> number = new List<int>(1000); // int list for 1000 numbers...- SGJ
- Thread
- Code Numbers Prime Prime numbers
- Replies: 21
- Forum: Programming and Computer Science
-
S
Is my code suffering from an arithmetic error?
What it does is described well in my comments. I'm using decimal, which is more precise than double but has a smaller range of values. https://msdn.microsoft.com/en-us/library/ms228360(v=vs.90).aspx const decimal pi =...- SlurrerOfSpeech
- Thread
- Algorithm Arithmetic Code Error
- Replies: 1
- Forum: Programming and Computer Science
-
A
MATLAB Python and MATLAB giving different results for same code?
I am trying to learn Python by translating my MATLAB codes into Python. My translated Python code is giving slightly different result as compared to that of MATLAB. Although difference is very small but it affects largely the results at later stage. My Python code is import numpy as np import...- Atr cheema
- Thread
- Code Matlab Python
- Replies: 11
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
T
What Is the Genetic Code?
According to https://www.ncbi.nlm.nih.gov/books/NBK21950/ and some other sources: 'Genetic code is the set of correspondences between nucleotide pair triplets in DNA and amino acids in protein.' What dose correspondences mean in this regard? I don't understand why nucleotide pair triplets and...- Tyto alba
- Thread
- Code Genetic code Genetics Mean
- Replies: 5
- Forum: Biology and Medical
-
Java Problem with code, possibly multiple extensions of JFrame
I am making a simple text editor program. You can load, save and exit, and other things. I have the loading and saving working, but the exiting is giving me a peculiar problem. In my project, I have a gui class that extends JFrame, and I also have an ExitOption class that extnds JFrame. I am...- BiGyElLoWhAt
- Thread
- Code Java Multiple
- Replies: 5
- Forum: Programming and Computer Science
-
Trying to compile a source code in C
The source code is as follows: #include <stdio.h> #include <math.h> #define pi 3.14159265 #define nbin 10000 #define small 1.e-12 int addj(int data[nbin],double *tw,double x,double y,double vx,double vy, int xn,int j,double tc); void billiard(int data[nbin],int nx,int nt,double x); void...- MathematicalPhysicist
- Thread
- Code Source
- Replies: 5
- Forum: Programming and Computer Science
-
S
Can someone code review my "Distance between nodes in a BT"?
Here's the solution I used for an online coding test with a major employer and I got rejected. Let me know about improvements I could make. Thanks. using System; using System.Collections.Generic; using System.Linq; class Node { public int Val { get; set; } public Node Right { get...- SlurrerOfSpeech
- Thread
- Code Nodes Review
- Replies: 3
- Forum: Programming and Computer Science
-
T
Running code using XCode vs Terminal
I have a C++ code, test.cpp, and am using OpenMPI when running it. I followed the instructions here and it appears to have called OpenMPI correctly. I can compile and run the code perfectly fine from the command line but I just have to specify "TMPDIR=/tmp" before running it, i.e.: $ mpic++...- TheCanadian
- Thread
- Code Running
- Replies: 9
- Forum: Programming and Computer Science
-
Help Writing a Program: Solving Encryption with Matrix and Key Sequence Method
Homework Statement For our final test preparation we were given a few problems to write and this is one of them: I would be very grateful if you could help me find the easiest way to solve it. Homework Equations 3. The Attempt at a Solution [/B] First let me tell you my plan for writing this...- doktorwho
- Thread
- Code Pascal Program Writing
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
The order of complexity of the Pascal code -- like n * log(n)....
Homework Statement The kind of problems i we are currently dealing with in school are like this: Find the order of complexity of the function Homework Equations 3. The Attempt at a Solution [/B] Im suppose to guess or calculate the complexity of this based on code sample. Its in Pascal and...- doktorwho
- Thread
- Analysis Code Complexity Pascal
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
R
Open source code that hysys was built on
Does anyone know what the open source code is called that hysys was built on so I can file a freedom of information act paper work. I would also like to do this for NEC-2 for antenna radiation modeling.- rppearso
- Thread
- Code Open source Source
- Replies: 6
- Forum: Materials and Chemical Engineering
-
A
"Mathematica" code for the "+" option.
Sometimes I include Mathematica code. Is is possible to include this option when including code in the thread for the language option? For example, would be nice to have a heading as "Mathematica" in the following code insert rather than "text": my mathematica code- aheight
- Thread
- Code Mathematica
- Replies: 2
- Forum: General Math
-
C
How to code ultrasonic beam propagation
Does anyone have an open source code or know how to code propagation of multi gaussian beams through multiple interfaces using the ABCD matrix approach? And this is using ultrasound and not optics. Please let me know if anyone can help out in this- chiraganand
- Thread
- Beam Code Propagation Ultrasonic
- Replies: 3
- Forum: Programming and Computer Science