Code Definition and 908 Threads
-
L
Is it ethical to ask for somebody else's research code?
Hi all, This is my first post here. I had a hard time determining the correct subforum to ask this question, as this is not a technical issue, and is closer to academic problem. Having read the subforum guidelines, this post doesn't seem to suit the subforum's purpose, but let alone other...- lambrtz
- Thread
- Code Research
- Replies: 8
- Forum: STEM Academic Advising
-
T
What is the mathematical approach to solving letter/digit code puzzles?
Homework Statement I was flicking through the newspaper the other day and noticed there is a type of puzzle where words are added together to form a sum. Each letter represents one of the digits 0-9, for example: FUN +JOKE =HAHA and the aim of the puzzle is to find which...- t_n_p
- Thread
- Code Puzzle
- Replies: 8
- Forum: Precalculus Mathematics Homework Help
-
G
U.S. Tax Code probability homework
Hello All, I am new to these forums and hope someone may help me out. I am doing an assignment and am stuck on one of the questions. There is a sample of 1000 people of different age groups. 18-24, 25-34, 35-44, 45-54, 55-64, 65 or older People were asked if they thought the new tax...- g3lo
- Thread
- Code Homework Probability
- Replies: 3
- Forum: Precalculus Mathematics Homework Help
-
S
C/C++ Is there an efficient way to find divisors of large numbers using C++?
As I saw in wolfram website and in pari , if given divisors(x) , it will give all the divisors of x in a row. ex: divisors (34567) = { 1, 13, 2659, 34567 } So I we know some x = 2^5 * 5^15 * 21^5 * 119 , Here we even know the prime factors Then, Is there any program in c language (or) any...- smslca
- Thread
- Code
- Replies: 6
- Forum: Programming and Computer Science
-
P
MATLAB Access Variable in MATLAB Structure Using User Input
Hi I am trying to use MATLAB for some data analysis. I start by getting user input for a variable called exptno, Then I want to access a location in a structure, but to do this I need to append the variable exptno to the name of the structure. Ill try and give an example to hopefully make it...- peterjaybee
- Thread
- Code Matlab Matlab programming Programming
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
X
Some help with MIPS assembly code
Hey guys. I'm trying to practice some basic MIPS, but I can't seem to get this right. You just plug in the number and then you follow the code and you'll get obviously the end result. I can't get the result for these here. Does anybody know? I'd really appreciate help. Thank you! 1. $t0 =...- XodoX
- Thread
- Assembly Code Mips
- Replies: 3
- Forum: Programming and Computer Science
-
S
Silvaco Software code or script
Hi all, I am doing a project that needs me to design a PMOS transistor with a channel length of 65 nanometers using Silvaco TCAD tools. As you may know, there are examples provided in the software that I am using to customize in order to get the required channel length. So, I have to modify...- shoofeer1
- Thread
- Code silvaco Software
- Replies: 5
- Forum: General Engineering
-
J
Can execution time of this C code be reduced?
Hi. I've been working on a finite-difference problem in differential equations. I was wondering if this code can be further optimized, perhaps eliminate some if statements or assignment statements. That is, what is the most efficient way to code this or is it already written in the most...- jackmell
- Thread
- C code Code Time
- Replies: 11
- Forum: Programming and Computer Science
-
D
Python Why won't this python code work?
lists = [(2 * i + 1) for i in range(100)] i = 0 while (i < 100): if(lists[i] == 3): lists.remove(lists[i]) i = i + 1 print lists It is giving me an error about the index being out of range. I am new to python and I am not understanding this error. Edit: Fixed it. This is by...- dmatador
- Thread
- Code Python Work
- Replies: 1
- Forum: Programming and Computer Science
-
C
MATLAB Transfer fourier series into matlab code.
Hey guys, i need to transfer Fourier series equation into MATLAB code. Anyone can help me in transfering?- chingwee88
- Thread
- Code Fourier Fourier series Matlab Matlab code Series
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
PIC Code Uncertainty: Why Does Placement Matter?
Hi, I have just managed to make a PIC light blink. My question has to do with the syntax. In my code, I use a Delay subroutine that is called in between turning the LED on and turning it off. I tried two codes. The first had my Delay subroutine being placed before my main code. The second had...- El Moriana
- Thread
- Code Uncertainty
- Replies: 10
- Forum: Electrical Engineering
-
F
Romberg integration fortran code
how to code it?...sequence? logic?.. -
B
LaTeX LaTeX Code Distorsion in Forum Edit Mode
Hi. When I write my LaTeX code in this forum, it appears completely distorsionated when I click "Preview Changes" in edit mode. For example: n^2(\rho) = n^2_0\left(1-\alpha^2\rho^2)\right) is shown as a "z" if previously I wrote z. In fact, I don't know if this post will be shown well...- Bromio
- Thread
- Code Edit Forum Latex Mode
- Replies: 10
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
C
C/C++ Solving Prime Number Code Error in C++
I was writing a program to find if a given number is prime or not. I can't figure out what the error is. /* To check if a number is prime*/ #include <iostream> #include <cmath> using namespace std; int main() { float a; int p,i,f=0; p=sqrt(a); if(a %...- chaoseverlasting
- Thread
- C++ Code Prime
- Replies: 16
- Forum: Programming and Computer Science
-
S
Requesting permission to post the code
I have written a C code program for factorization of a given number into two divisors, when the two divisors are having approximately the same number of digits . It cannot check for prime numbers. With my code limit I can check it only upto 14 digits using long long int. It is working...- smslca
- Thread
- Code
- Replies: 13
- Forum: Programming and Computer Science
-
G
Packaged software for alloys, pwscf code (quantum espresso)
Hello all, i need a packaged software for electronic band structure of alloys (semiconductors alloys) using pwscf code, quantum espresso. thanks- gyalcin
- Thread
- Code quantum espresso Software
- Replies: 1
- Forum: Atomic and Condensed Matter
-
P
Fortran Code for Solving Linear System w/ Least Square Method
Dear all: For a standard linear system, y(n*1)=A(n*n)x(n*1) If y is exact and A is well-conditioned, it is easy to calculate x. However, if y has some disturbances or some errors, at the same time, A matrix is ill-conditioned. It is difficult to accurately obtain vector x...- passionfly
- Thread
- Code Fortran Linear Linear system Method Square System
- Replies: 1
- Forum: Linear and Abstract Algebra
-
T
Finite Difference Approximation, Mathematica code
Homework Statement I have to program a three component decay chain using finite difference approximation. I understand finite difference and have written my code, but I have an error I can not find which is giving me an erroneous answer. The curve is correct, but the magnitude of the...- timman_24
- Thread
- Approximation Code Difference Finite Finite difference Mathematica
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
P
Fortran Debugging Strange Fortran Code: A Simple Delta Function
Hi guys, I just wrote a simple code for delta function and print it out. Here it is. program main implicit none integer i real*8 del real*8,parameter:: ep=1D-2 real*8,parameter:: pi=3.1415926 do i=-10,10,1 write(*,*)...- phynewb
- Thread
- Code Fortran Strange
- Replies: 5
- Forum: Programming and Computer Science
-
N
MATLAB code to Geometric Random Variable
Homework Statement Generate Geometric RV with Porbabilty of succcess 0.1 using only rand() Homework Equations rand() geometric rv P=(1-p)^(k-1) * p where p=0.1, k is number of trial in which we get 1st success The Attempt at a Solution rand(n)- neeraj.patel1
- Thread
- Code Geometric Matlab Matlab code Random Random variable Variable
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
D
LaTeX How to post this Latex code on forum?
Hello! I just finished typing up my first Latex document for a proof I worked on. Now, I'm having trouble posting it on these forums. Here is the source code... \begin{document} $f : \mathbb{R} \Rightarrow \mathbb{R}$ is odd $\;\Longleftrightarrow \;f(-x) = -f(x) \;\forall x$. Show that...- darkestar
- Thread
- Code Forum Latex
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB [matlab] something wrong with my code
Hi all I'm new to matlab/scilab. I want to draw a 3D surface using z = cos(x+y)*cos(3x-y)+cos(x-y)*sin(x+3y)+5e^(x2+y2)/8 I typed "Z=cos(x+y)*cos(3*x-y)+cos(x-y)*sin(x+3*y)+5*exp(-(x.^2+y.^2)/8);" into matlab, but is says "Inconsistent multiplication". I would appreciate anyone who...- Ann_Hope
- Thread
- Code Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
Scilab Help: Create 3D Surface Code | Due Tuesday
Hi all I'm new to scilab. I was given an assignment to use scilab to draw a 3D surface. It needs to be creative and clearly noted what the codes mean. I'm totally freaking out with my assignment because it is due Tuesday next week. I would apprecriate anyone who could help me. Thanks for...- Ann_Hope
- Thread
- 3d Code Surface
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
N
MATLAB code to Generate Raleigh Random Variable
What is the Matlab code for generating 100,000 Raleigh Random Variable with sigma^2=2 using rand command only. Generate histogram and normalize it by dividing 1,00,000 times the bin width- neeraj.patel1
- Thread
- Code Matlab Matlab code Random Random variable Variable
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
R
MATLAB Analyzing Falling Object w/ Linear Friction: Troubleshooting Code
It's an object that's falling from rest. The equation takes into account linear friction. in any case, this is is my code or program of whatever it is called: m=80;%Mass of ignorance g=9.8;%Gravity beta=1.6*10^-4;%Given coefficient for air at STP D=.4;%Diameter of Palin, assuming she's a...- Raziel2701
- Thread
- Code Falling Falling object Friction Linear Troubleshooting
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Fortran Fortran Code for Calculating Second-Order Derivative | Get Help Now!
I'm looking for a fortran code to calculate second-order derivative from a dataset. Please help me!- jimmytung
- Thread
- Code Fortran
- Replies: 2
- Forum: Programming and Computer Science
-
LaTeX Practice test latex source code
Does this forum have a source code 'sandbox' to practice test latex source code for publishing on Physics Forums? I remember a sandbox a long time ago when latex was first introduced on Physics Forums, was it removed? [/Color]- Orion1
- Thread
- Code Latex Source Test
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Writing a code in matlab for n variables.
Hi, I am very new to matlab, this is actually the first time I am using it. I have to write a code for finding averages, right now I have "function av=average(x1,x2,x3,x4,x5) % average(x1,x2,x3,x4,x5) returns the average of (x1,x2,x3,x4,x5) av=(x1+x2+x3+x4+x5)/5; return;" This works just fine...- mmmboh
- Thread
- Code Matlab Variables Writing
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
G
Matlab, code to eval Jacobian Matrix numerically
Homework Statement The question is in 5 parts all mainly to do with Newton's Method, I've done parts a,b,d and e, but am struggling with the understanding of part c. They have given us the code but unsure as to how to modify my own code to suit the question. Another problem is I don't...- Gameowner
- Thread
- Code Jacobian Matlab Matrix
- Replies: 2
- Forum: Calculus and Beyond Homework Help
-
T
MATLAB Matlab Help -- code to randomly select a file and a sentence in that file
clc for ii=1:1:3 % start looping rand_id= rand(1,1) *3; % Randomly generte a number between 1 to 3.if (rand_id<1) rand_id=1; % 0 is ommitted. else rand_id=floor(rand_id); end % rand_id will be used to open a previously saved file randomly. if (rand_id==1)...- tinglin
- Thread
- Code File Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
L
Matlab Code Help for x[n]=x(n2Ts)
Homework Statement x(t)=4sin(0.5t).3u(t) x[n]=x(n2Ts) The 1st equation, x(t)=4sin(0.5t).2u(t) Code : >> A=2; >> wo=0.5; >> t=5:0.25:50; >> x=A*sin(wo*t).3*(t>=0); >> plot(t,x), grid on >> xlabel('t (s)'); ylabel('Amplitude(unit)') But the second one,x[n]=x(n2Ts), I don't know...- lcw1972
- Thread
- Code Matlab Matlab code
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
P
How Challenging Is It to Create a Non-Symbolic MATLAB Laplace Transform Solver?
Hi all How hard is it to write a symbolic laplace solver ? (I am aware that there are many available out there, but I wanted to write one in MATLAB which doesn't use symbolic toolbox). Where can I start to get a good reference for the code ? Thank you Prabhakar- prabhu2288
- Thread
- Code Laplace Laplace transform Transform
- Replies: 1
- Forum: General Math
-
W
What Type of Code is This for PIC Microcontrollers?
Hi! May I know what type of this source code it is?It looks like assembly code, but I'm not sure. LIST p=16f648a include "P16f648a.inc" __config h'3f18' PC equ h'02' cblock h'20' endc org h'0000'...- ws0619
- Thread
- Code Source Type
- Replies: 1
- Forum: Programming and Computer Science
-
A
MATLAB Help Needed: MATLAB Code for Semiconductor Laser Rate Equation
Can anyone help me by giving MATLAB code to simulate semiconductor laser rate equation by finite difference methord. i wrote a code but that was not working. so i need it badly. please help me.- almesba
- Thread
- Code Matlab Matlab code
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Code Requirements for finger-safe Conductor Rail
Code Requirements for "finger-safe" Conductor Rail I'm planning to install conductor rails about 7ft above the floor in an astronomical observatory. The rails are IP2 "finger safe" rated. Where should I look to determine if this is sufficient enough for conductor rails which will be within...- jhaislip
- Thread
- Code Conductor
- Replies: 1
- Forum: Electrical Engineering
-
M
Troubleshooting Code: Counting A Wins Over B
can someone tell me what is wrong with my code? i am trying to make a code that has 1000000 randomly choosing A or B 1000 times. if A is bigger than B, i want to increment the variable called 'aWins'... when i try to get it to print the screen is blank. i left out the int main and #include parts...- magnifik
- Thread
- Code Counting Troubleshooting
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
T
Java Can someone look at this Java code for me?
im starting a project from an Ebook that seems to be missing a line or two or something. Can someone suggest what should be here? I added the ending parsing since it was one of the more obvious missing things. import com.sun.j3d.loaders.*; import...- the other guy
- Thread
- Code Java
- Replies: 7
- Forum: Programming and Computer Science
-
P
How Does Simple Encryption Work in Java Programming?
Hello, My professor wants us to code a program that encrypts a massage and decrypt it , I know that to encrypt something you need a message and a key, and you assign a number to each letter or the message, and you do the same with the key, and then you add the two numbers together to get...- philippe311
- Thread
- Code Encryption Explanation
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
A
Where can I find source code for scientific programs?
:rolleyes: ... not sure if this is the right place to post this. Hi, I'm looking for something like GSL but with programs instead of routines. For example, there is a method that was developed in the 80's for solving the time-dependent Schrödinger Equation (M. D. Feit, J. A. Fleck Jr. and...- andresordonez
- Thread
- Code Programs Scientific Source
- Replies: 1
- Forum: Programming and Computer Science
-
Z
Why does the function file_object.readlines() return code and not text?
Okay, I just began a bit of a python phase, and I want some help. You'll probably be hearing from me quite a bit in the next few weeks. Anyway, my question is about I/O functions. Specifically when it comes to opening and closing text documents. I have successfully opened a file (which I...- zakbrown0308
- Thread
- Code Function Text
- Replies: 5
- Forum: Programming and Computer Science
-
C
How to Calculate C Parameter in FMn Card for MCNP Code
Hi there I have a question about FMn card in mcnp code. there is a parameter (is named C) in front of FMn card, I can not understand to calculate the value of that parameter. please help me. thanks alot.- chivasorn
- Thread
- Code Mcnp
- Replies: 2
- Forum: Nuclear Engineering
-
M
Calculating Hypotenuse with C++ Code
i am trying to write a code that calculates the hypotenuse of a triangle... when i try to run it, i get a run time error. I'm not exactly sure what the problem is. #include <iostream> #include <cmath> using namespace std; void hypotenuse(double side1, double side2...- magnifik
- Thread
- Code Triangle
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
M
Is My MATLAB Code for Heat Transfer Correct?
Hi so i have a heat transfer project to determine the material (aka the thermal conductivity) and length of a 2d wall. It has to have between -1 and 1 net rate of heat loss from the southern side and above 145 rate of heat transfer from the eastern side. The wall is 20 cm high na the boundry...- MEAHH
- Thread
- Code Heat Heat transfer Matlab Matlab code
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
B
PHP WEBSITE HIJACKED - Php code infected - HELP?
WEBSITE HIJACKED - Php code infected! - HELP!? Hey All, I've got a major *$%#@ problem. I'm freaking out here. Check this out. On my website, I have a way to allow visitors... to become distributors and sell my product as well. When they become a distributor, it creates a subdomain for...- bigdawg723
- Thread
- Code Php
- Replies: 5
- Forum: Programming and Computer Science
-
F
Optimization of C code: smoothing an image.
Homework Statement I need to optimize this given code: /* A struct used to compute averaged pixel value */ typedef struct { int red; int green; int blue; int num; } pixel_sum; /* Compute min and max of two integers, respectively */ static int min(int a, int b) { return (a < b ...- Fronzbot
- Thread
- C code Code Image Optimization
- Replies: 25
- Forum: Engineering and Comp Sci Homework Help
-
S
Need help forgot my alarm code.
Hi Guys sorry to be a pain We had a power cut in the area, and it messed my alarm up i put my code into turn it off but instead reprogrammed it with a new code. the buttons i used were 12349 but can't remember the order i put them in, could someone pm me a list of combinations to try. it is...- stewartw
- Thread
- Code
- Replies: 7
- Forum: General Math
-
H
C# Can anyone explain what this c# code does or give a C equalivent?
C# vs c ! Hello every body! can anyone explain what this c# code does or give a C equalivent? public static void Replace(ref byte b, int pos, byte value) { b = (byte) (value == 1 ? b | (1 << pos) : b & ~(1 << pos)); } public static byte...- hadi amiri 4
- Thread
- Code Explain
- Replies: 5
- Forum: Programming and Computer Science
-
F
Optimization of C Code Loop Unrolling
Homework Statement I need to optimize this given code that rotates an image 90 degrees so it runs at least three times faster: void naive_rotate(int dim, pixel *src, pixel *dst) { int i, j; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) dst[RIDX(dim-1-j, i, dim)] =...- Fronzbot
- Thread
- C code Code Loop Optimization
- Replies: 10
- Forum: Engineering and Comp Sci Homework Help
-
K
MATLAB How to Create a Routine in Matlab for Summing Every 10 Steps of a Matrix?
hello every one. I want to create a routine in matlab Let A be a (40,1) matrix. I want to create a routine that every 10 steps of A will take the sum and place it in a new matrix. ty- kickapoo
- Thread
- Code Matlab
- Replies: 11
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Numerical integration - optimisation of code
Hello I have a function which is very similar in shape to a Gaussian, except it is not a distribution and it is not analytic, so I can at best calculate a single point on the curve at a time. (In general it is a convolution of different distributions but this is not important). I need to find...- mikeph
- Thread
- Code Integration Numerical Numerical integration Optimisation
- Replies: 4
- Forum: General Math