Matlab Definition and 1000 Threads
-
E
MATLAB Does MatLab have this kind of function?
I have a set of variables that are always inputs for several functions that I made. Does MatLab have a kind of function that stores these variables into a single matrix (or similar) so that I just need to call this matrix for each function rather than calling them one-by-one as inputs into the...- ecastro
- Thread
- Function Functions Matlab Variables
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
MATLAB How to Set a Variable in Matlab as an Integer Only?
Is there a function in Matlab that presets the value of a variable as an integer only? For example I will set the variable 'y' as an integer at the very beginning of the code, and whenever the variable gains a new value it automatically returns an integer value. Thank you in advance.- ecastro
- Thread
- Integer Matlab Set Variable
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
MATLAB Matlab to r-pi to I2C device issue
I have a 3-Axis Digital Compass IC HMC5883L I2C chip, I just want to use it to learn how to talk to sensors via a Matlab to raspberry-pie to I2C chip link. The set up from Matlab to the pi is straight forward and simple, the issue I'm having seems to be the address I'm being returned when...- jamie.j1989
- Thread
- Device Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Efficient MATLAB Repeating Function for User-Defined Rotations
Hey all, I need your help writing the meat of a function that I need for a MATLAB script I'm writing. The jist of it is, starting from 0°, when between 0.0° - 5.0° apply a certain value, when between 5.0° - 15.0° apply another value. However, the relative amount of rotation can be user...- Sirsh
- Thread
- Function Matlab
- Replies: 19
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Generating Ricean Channel using MATLAB
Homework Statement I want to generate a Ricean channel using MATLAB Homework Equations Assuming that Ω = -30 dB. The Attempt at a Solution I know how to generate a Rayleigh channel using matlab: H = 1/sqrt(2) * ( randn(N,M) + j*randn(N,M) ) But I really have no idea how to do that for...- JasonHathaway
- Thread
- Channel Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
F
MATLAB Question about Fourier transformation in Matlab
Hello everybody. I am triying to calculate a band-pass filter using the Fourier transform. I have a vector with 660 compomponents; one for each month. I am looking for a phenomenon which has a periodicity between 3 and 7 years (it's el niño, on the souhtern pacific ocean). I want to make zero...- Frank Einstein
- Thread
- Fourier Matlab Transformation
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
Matlab code problem with differential equations
Homework Statement For a following differential equation d^2y/dx^2-4y=(e^x)/x Find the solution using numerical methods Homework Equations d^2y/dx^2-4y=(e^x)/x The Attempt at a Solution %num dx=0.01; x=1:dx:3; l=zeros(1,length(x)); m=zeros(1,length(x)); l(1)=1; m(1)=0.25; for...- pugtm
- Thread
- Code Differential Differential equations Matlab Matlab code
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
R
Model reaction diffusion brusselator 2d matlab
Hello, I have a project (model reaction diffusion brusselator 2d) ∂u/∂t=A+u^2v-(B−1)u+D1((∂^2)u/∂(x^2)+(∂^2)u/∂(y^2)) ∂v/∂t=Bu−u^2v+D2((∂^2)v/∂(x^2)+(∂^2)v/∂(y^2)) initial conditions: u(x,y,0) = 0.5 + y, v(x,y,0) = 1 + 5x. boundary conditions: ∂u/∂n = 0, ∂v/∂t = 0 n-external normal to the...- RiseFox
- Thread
- 2d Diffusion Matlab Model Reaction
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB How to make 2D plot of points with different colors?
I want to make a 2D plot of points with different x, y coordinates and have colors depending on a separate variable. I have make column vectors for x and y coordinates and another column containing 1 or -1. I would like to represent the points with 1 as red and -1 as blue points. I have codes as...- kelvin490
- Thread
- 2d Color Matlab Matlab code Plot Point Points
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
N
MATLAB Creating Music with MATLAB: Code, Synthesis, and Possibilities Explained
I have project code using MatLab and so far I am having difficulties of understanding what it is asking for. May anyone explain for me please. The file fugue.mat It contains numerical data that encode about 30-seconds worth of Johann Sebastian Bach's Fugue #2 for the Well-Tempered Clavier. You...- needOfHelpCMath
- Thread
- Matlab Music
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
How Do You Implement Root-Finding for Compressibility Factors in MATLAB?
Homework Statement Compute and plot the compressibility factor (y) verses pressure (x) for the (1) Van der Waal’s (2) Redlich-Kwong and (3) Peng-Robinson equations of state. Compressibility Factor, Z = (P*v)/(R*T); where v is the specific volume (V/v). Data for n-Butane: T = 500 K; Tc = 425.2...- ShakeSpee
- Thread
- engineering matlab method newton
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
Find Fourier transform and plot spectrum by hand & MATLAB
Homework Statement Link: http://i.imgur.com/JSm3Tqt.png Homework Equations ##\omega=2\pi t## Fourier: ## Y(f)=\int ^{\infty}_{-\infty}y(t)\mathrm{exp}(-j\omega t)dt## Linearity Property: ##ay_1(t)+by_2(t)=aY_1(f)+bY_2(f)##, where a and b are constants Scaling Property...- Captain1024
- Thread
- Fourier Fourier transform hand Matlab Plot Spectrum Transform
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
M
MATLAB MATLAB - Motion of a body around a central one
Hello everyone, I've written a code using ode45 which describes the motion of a body m around a central one M (e.g a satellite around earth). I've done it with initial values that set the trajectory of the particle to be elliptic. Clearly, energy and angular momentum need be conserved in this...- MMS
- Thread
- Body Matlab Motion
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB How to extract pdb data in Matlab
Hey I want to be able to extract the coordinates of different elements in a PDB data file. I have been able to extract the coordinates for all the atoms in 3 arrays in the x, y, z directions. However, I would like to have the x, y, z coordinates for each element separate. So an array for the...- MiloBoots
- Thread
- Data Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB Python to Matlab Conversion for fscanf & DWT
Hello, 1. Homework Statement I find diffuculties to transform fscanf and to apply the discrete wavelet transform order 2 from matla to python. Homework Equations This is the MATLAB code: D_P=fopen('distance_profil.txt','r'); i=0; while(feof(D_P)==0)% test for end of file i=i+1...- Simon_Azerty
- Thread
- Code Matlab Matlab code Matlab programming Python
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
W
MATLAB How Can I Parse MCNP Output Files in MATLAB?
Hello! I am really glad to find this forum! I was wondering if anyone has a MATLAB code to parse the MCNP output file MCTAL? I did some Lattice simulation but it seemed hard to read the MCTAL file directly.. Best regards- WWYY
- Thread
- Matlab Mcnp
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB MATLAB extract numbers in .txt file
Hi PF! I have a .txt file with spaces and letters, along with numbers. It looks something like this: 12.0 42.0 21.0 32.0 ICF-8-1 23.0 24.0 46.0 600.0 Additionally, the first two sets of numbers each represent a coordinate pair. Then the first coordinate is (12,42) and the second is...- member 428835
- Thread
- File Matlab Numbers
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB "Linear Model" of a Pendulum via Euler's Method
In my problem the linear modal is defined as the first term in the series expansion of \sin(x) so: \sin(x) = x - \frac{x^{3}}{3!}+\dots \sin(x) = x is the linear modal. So with this, I then have to write \frac{d^{2}x}{dt^{2}} = -\sin(x) as a system of x^{\prime} and y^{\prime}, so...- Euler2718
- Thread
- Euler's method Matlab Method Model Pendulum
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Rewriting ODE's into lower orders
Homework Statement Express \frac{d^{2}x}{dt^{2}} + \sin(x) = 0 In a system in terms of x' and y'. Homework EquationsThe Attempt at a Solution [/B] I seen this example: x^{\prime\prime\prime} = x^{\prime}(t)\cdot x(t) - 2t(x^{\prime\prime}(t))^{2} Where they then wrote: x^{\prime} =...- Euler2718
- Thread
- matlab ode
- Replies: 2
- Forum: Calculus and Beyond Homework Help
-
F
Implement the formula -x(i-1) + 2x(i) -x(I+1) in Matlab
Homework Statement I want to reproduce the following matrix: A= [1 -1 0 0 -1 2 -1 0 0 -1 2 -1 0 0 -1 1 ] What i want is to reproduce the second and third row with the formula -x(i+1) + 2x(i) -x(i-1) = 0 This is a coupled oscillation system of N masses (hanging in a rope). The first row...- Firben
- Thread
- Formula Matlab
- Replies: 7
- Forum: Advanced Physics Homework Help
-
L
Plotting in Matlab: w vs z in (-1,1) Domain
Homework Statement (In Matlab) The variables w and z are related by w=cos(n*acos(z)) and z=cos(acos(w)/n) for n = 1,2,3,4 plot w vs z over domain (-1,1). Homework Equations w=cos(n*acos(z)) z=cos(acos(w)/n) The Attempt at a Solution First I tried to substitute z into w and thought since I...- lee403
- Thread
- Matlab Plotting
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
N
MATLAB MATLAB Project: Tips, Guide & Concepts
I have a project and i need some help to understand the concepts, what is it asking for, major tips, and guide me through the process of the project. The program I will be using to program will be...- needOfHelpCMath
- Thread
- Matlab Project
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
N
What are the areas of expertise for NumberSix?
NumberSix solves problems using mathematics and mathematical software. He has worked on gesture recognition, speech recognition, video compression and several other highly mathematical areas. He has expertise in mathematical modeling, statistics, and linear algebra. He has many years of...- NumberSix
- Thread
- C++ Matlab Physics Python
- Replies: 2
- Forum: New Member Introductions
-
MATLAB MATLAB For Loop Help: Plot SVAJ Accel Graph w/ Norton 5th Ed
I have created a code in MATLAB that can plot the acceleration graph of the SVAJ diagram for 3 of the SCCA Family of Functions with a theta range from 0 to Beta. I cannot for the life of me, figure out what I am doing wrong, maybe some fresh eyes can help me. Ignore the 'trial', I'm trying to...- Chandlerw88
- Thread
- Loop Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Design a controller using Matlab
Homework Statement For the plant: ##G(s)=\frac{1}{s(s+2)(0.4s+1)}## Design a controller in Matlab such that ##K_v=4## , phase margin = ##60^o## and zero steady state error for step input. Homework Equations ##e_{ss} = Lim_{s->0} \frac{s R(s)}{1+D(s)G(s)}## Lead/Lag...- PhysicoRaj
- Thread
- Controller Design Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
T
MATLAB Arduino-MATLAB communication using SerialEvent() for PID Loop
Hello, I have an arduino code for driving a peltier pile to a given set point (TEMP_SP). I am trying to input the set temperature from Matlab GUI (with different protocols, user will enter n temperatures and the time intervals, arduino will implement the PID controller and output the...- troubled_grad
- Thread
- Arduino Communication Loop Matlab Peltier Pid Serial
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB How to extract data from existing JPEG/TiFF graph?
Is there any method to extract data from a graph in JPEG/TIFF format, using simple software such as MATLAB? I have a graph as shown below: I only have this picture but no raw data and I want to plot the black curve in this graph. How to get approximate numerical data of the x and y axis...- kelvin490
- Thread
- Data Data analysis Graph Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Matlab -- how can i use a FOR loop if I have 2 variables changing
Hey,for following code the 3rd loops i need to have 2 variables m and q .Could anyone help? for t=1:maxiterations toterror=0; for j=1:numfeature totslope=0; for i=1:m&&q=1:numfeature z=0; for jj=1:numfeature...- jiaying
- Thread
- Loop Matlab Matlab code Variables
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Solving MATLAB Problem: Sines, Cosines & Tangent Arrays
Hello everyone, I've stuck on a problem, and I need help Problem: 1: a) Evaluate and store the sine and cosine values of the values from 0 to 260 10 by 10 and store them to the separated arrays called sines and cosines before plotting the sinusoidal graphs of these arrays, b) Evaluate the...- Erkan Tur
- Thread
- Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
MATLAB How to Define Temperature in a MATLAB Mass Transfer Simulation?
Hi Guys, I'm trying to do a simple first-order, 1d (x-direction) simulation of mass transfer with the finite element toolbox in MATLAB for the following closed set of equations: (Please note: "X" is not to be confused with the lowercase spatial dimension "x") However, every time I...- Meaningless
- Thread
- Matlab Numerical
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Problem with Generating Barnsley Fern Fractal in MATLAB
The code is as followed: function fern() AI = [0 0 ; 0 0.16]; AII = [ 0.85 0.04 ; -0.04 -0.85 ] ; AIII = [ 0.2 -0.26 ; 0.23 0.22 ] ; AIV = [-0.15 0.28 ; 0.26 0.24 ];BI = [ 0 ; 0]; BII = [ 0 ; 1.6]; BIII = [ 0 ; 1.6]; BIV = [0 ; 0.44]; N = 10000; I = 50; H = zeros(N,2); for n=1...- Euler2718
- Thread
- Fractal Matlab
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
G
Compliance matrix from strain matrix, Matlab
Homework Statement (I'm trying to replicate some results in an academic paper where they have calculated elastic properties of a crystal. Because I'm going to do a lot of similar time-consuming calculations following this one, I need to learn how to do them using a computer.) The compliance...- grepecs
- Thread
- Compliance Matlab Matrix Strain
- Replies: 1
- Forum: Advanced Physics Homework Help
-
MATLAB Solve Riccati (DARE) with MATLAB
Hey all, I was wondering if you can help me define the arguments for the dare() function of matlab. Here is the DARE form I have: \begin{equation} \begin{split} \Phi(p_\infty) &= \Phi_\infty = \Phi_{33}-\Phi_{32}(\Phi_\infty+\Phi_{R})^{-1}\Phi_{23}\\...- perplexabot
- Thread
- Matlab
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB How to get the last variable of a for loop in MATLAB
Aloha guys, I am just having trouble getting MatLab to output only the last variable of my "for loop." If anyone can help all I am looking for is an example of notation. p.s. I have done this before just not in a while and will continue to look through my old scripts and functions. just not in...- KonaGorrila
- Thread
- For loops Loop Matlab Matlab code Variable
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
I
I How to turn model of Schrödinger's Equation 2D?
Hi, I am a student in the Netherlands, currently 17 years old and at the end of my 'middelbare school', meaning that next year I'll be a bachelor student at a university. I am doing an extended essay/research thing that is custom you do in your last year, with a friend of mine. We picked the...- IsaiahvH
- Thread
- 2d Matlab Matlab code Model Schrödinger Schrodinger equation Schrodinger's equation
- Replies: 6
- Forum: Quantum Physics
-
E
MATLAB What is wrong with this WHILE loop?
Here is my code: while a ~= 3 || b <= 1; a = a - 1; (other expressions); end; For this code, the 'while' loop should stop when 'a' reaches 3, however it does not, even though 'a' starts with a higher value than 3. The 'other expressions' part are calculations that manipulate 'b', the only...- ecastro
- Thread
- Loop Matlab
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
B
Problems with Matlab code for simulating spring motion
The issue I am having is setting up the actual program for the problem. I am having trouble interpreting the code and, because of that, having issues getting it to work properly. The whole thing was written with Matlab and the goal was to write a function that could simulate the motion of a...- bcolson
- Thread
- Code Matlab Matlab code Motion Spring
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
J
MATLAB Solving Orbital Motion Equations with RK4 Using MATLAB
I'm trying to plot the solutions of the second order differential equation d^2R/dt^2 = GM/R^2 + Lz^2/R^3. I'm reducing this to a system of first order ODEs and then using RK4 to solve this system. My code is given by function RK4system() Tsim = 10...- Jordan_Tusc
- Thread
- Astrodynamics Matlab Matlab code Numerical analysis Orbits Plotting Runge kutta Trajectories
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Discovering MATLAB: Tips for Learning from Scratch
Hello everyone, For those of you who are familiar with MATLAB and have worked with it in the past, I would like to hear from you guys about efficient and good ways to learn it from scratch. I would appreciate it if you can also specify websites, books, online courses or whatever it is that you...- MMS
- Thread
- Matlab scratch Tips
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
X
Designing butterworth filter of Nth order
I want to design a digital butterworth lowpass filter of nth order, with only freedom of choice to user being order of the filter and the cut off frequency, i already have a 1st order low pass. Code: T = 1/(2*pi*this.fc); this.A = -1/T; this.B = 1/T; this.C =...- Xatax
- Thread
- Designing Filter Matlab
- Replies: 1
- Forum: Electrical Engineering
-
J
Matrix riccati differential equation using matlab
Homework Statement Homework EquationsThe Attempt at a Solution- Jeffrey Eiyike
- Thread
- Differential Differential equation Matlab Matrix
- Replies: 6
- Forum: Calculus and Beyond Homework Help
-
MATLAB IDE with support for MATLAB and Circuit Simulators
Hello. I am using Linux platform to do Embedded System Programming. I want to know the name of Integrated Development Environment software that runs on Linux or Windows (via Wine on Linux) and that has support for MATLAB and any circuit simulation software. Also, please let me know a good...- pairofstrings
- Thread
- Circuit Matlab Support
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Matlab deployment Error because of folder permissions
Hey guys, so I wanted to give Matlab a shot regarding programming standalone applications but I keep getting the same error whenever I use "deploytool" in the command prompt. The error message picture is attached to this message. According to the error message I must change my MATLAB current...- Guidestone
- Thread
- error matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB Calculating Total Eigenvalues in Matlab
Hi. How do you calculate Total eigenvalues smaller than a certain value in Matlab?- anahita
- Thread
- Eigenvalues Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB How to Calculate the Second Derivative of a Curve in Matlab?
I have a set of data as follows, How can I calculate the second derivative of the curve obtained from these data. x=[0.1;0.07;0.05;0.03;0]; r=[-98.9407;-105.7183;-111.2423;-116.0320;-120.0462];- anahita
- Thread
- Derivative Matlab Second derivative
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
I
MATLAB Transforming part of matlab code to Fortran90
Here are my Fortran codes: program test implicitnone integer*4 nxProjPad, cf, numViews, cc, index, indRad, iv, i, INDEX1, d, n real*4 v4, v5, RSS, S1, F1, gMDL real*4, dimension(:), allocatable :: array, sum, cumsum, transpose, log, SS1, SSs nxProjPad=185 numViews=180...- i_a_n
- Thread
- Array Code Fortran90 Functions Matlab Matlab code Variable
- Replies: 8
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
What was most helpful understanding Signals and Systems?
Hey guys! This is my first day on the forum so, hey! I'm a third year electrical engineering student and I'm really having some trouble with Signals and Systems so I want to know what helped other people understand it so that maybe I could try some of their methods. What were your biggest...- Woa90210
- Thread
- Electrical engineering Electronics Engineering Matlab Signals Signals and systems Systems
- Replies: 7
- Forum: STEM Academic Advising
-
MATLAB How can I append new columns to an existing Excel file with MATLAB?
I would like to ask how to use MATLAB to append new columns into existing excel file without altering the original data in the file? In my case I don't know the original number of columns and rows in the file and it is inefficient to open the files one by one and check in practice. Another...- kelvin490
- Thread
- Array Column Columns Excel Matlab Matrix
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB How to Convert Matlab Gaussian Cone Code to C++?
anyone help me to convert this sample code of Gaussian Cone shape of random number code in Matlab into C++ function GaussianCone clear all; clc; mx=10000; my=mx; mz=mx; z=[1:1:mz]'; sigma=0.01; R=0.5; mu=0; sigmax=sigma+R*z; sigmay=sigma+R*z; x=zeros(mx,1)...- MAKK
- Thread
- C++ programming Code Matlab Matlab code Matlab programming Programming c++
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
R
MATLAB Interpolating a zoomed in colorscale image in Matlab
I have no idea what I am doing wrong. I have already found multiple places on the internet which give clear examples of how to do this, yet I am still struggling. Please help me out, or at least point me somewhere. My code is below. I am trying to interpolate pixels of a full color image. The...- RMZ
- Thread
- Image Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX