Matlab Definition and 1000 Threads
-
P
MATLAB [Matlab] Replace pixels of an image with theta of Polar Coordinates
Dear Math and Physics fans You have always been so helpful in the past and I was hoping that I could call on your expertise once again. I want to make a wedge filter in MATLAB so I can determine the orientation of the ellipse of a centered 2D fft. I tried to make an new image where...- physical101
- Thread
- Coordinates Image Matlab Polar Polar coordinates Theta
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Rutherford scattering using MatLab
I'm writing a program for simulating the angle distribution of scattered particles from a gold nucleus but I doubt the results. I don't know...But it would be very good if someone check it and give some hints. I also want to ask should I vary both initial speed and impact parameter in one...- ShayanJ
- Thread
- Matlab Rutherford Rutherford scattering Scattering
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB Measuring the 'purity' of a sine wave using FFT (Matlab)
I have a range of sine waves I have obtained in an experiment. I want to put a measure on the purity of these sine waves - how well the reproduce a theoretical sine wave. Is there anyway I can analyse the FFT of the sine waves in Matlab and put a measure on the purity of the sine wave...- SK1.618
- Thread
- Fft Matlab Measuring Sine Sine wave Wave
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB .Should I Upgrade to the Latest Version of Matlab?
Hello, I have just been wondering that given each year we get two new versions of Matlab, for someone like who uses/used Matlab 2001 (or Matlab 7) I am wondering if there's a great reason to move to the recent versions (Matlab 2014a) even when I use only a selected number of toolboxes. Thanks- medwatt
- Thread
- matlab
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
V
MATLAB Minimizing a function in one variable in Matlab
This problem was originally a multi objective problem but using scalarization it can be transformed to the following: Min: -p'*x + u*x'*V*x subject to 1*x=1 -u is the risk aversion index that I wish to vary from .1 to 100 -V is a (4x4) variance covariance matrix -p is the (4x1) expected...- vasqueza34
- Thread
- Function Matlab Variable
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB Entering simulink 3D look-up table data from MATLAB
I have created a contour plot in MATLAB using the following code: >> NP=40; >> [RP TP]=meshgrid(linspace(min(RPM),max(RPM),NP),linspace(min(BMEP),max(BMEP),NP)); >> BSFC_IT=griddata(RPM,BMEP,BSFC,RP,TP); >> NC=12; >> Fig1=figure; >> [CT...- Alex91
- Thread
- 3d Data Matlab Simulink Table
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
U
MATLAB Solving equations involving specific elements of matrices in MATLAB?
So let's say I have 2 matrices A and B. I need to solve 2 eqns involving specific elements of each matrix. e.g. A(1)+B(2)=4; A(1)-B(2)=2. Is there any way to do this? My efforts with Fsolve and solve have failed. Here's what I've done so far: function F=myfun(A,B)...- Urmi Roy
- Thread
- Elements Matlab Matrices Solving equations Specific
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Troubleshooting Simple Harmonic Oscillator in MATLAB
I'm trying to plot the evolution of a simple harmonic oscillator using MATLAB but I'm getting non-sense result and I have no idea what's wrong! Here's my code: clear clc x(1)=0; v(1)=10; h=.001; k=100; m=.1; t=[0:h:10]; n=length(t); for i=2:n F(i-1)=-k*x(i-1)...- ShayanJ
- Thread
- Harmonic Harmonic oscillator Matlab Oscillator Simple harmonic oscillator Troubleshooting
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
MATLAB Can one repeat a matlab script from the beginning?
For one of my classes, our project is to write a script that simulates the game of craps. I have no problem with the actual game, but one of the criteria is that after the player wins or loses, we are supposed to prompt them to quit or play again (this is where I'm stuck). Is there a command...- eulergy
- Thread
- Beginning Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
MATLAB Matlab : Function handle givin array to cell array of function handles
Hi. I am currently in a situation where I have a function handle giving as putput an array of doubles. I would like to convert this to a cell array of function handles, each giving a component of the previous array. The original function handle is produced by a built-in MATLAB function, so...- espen180
- Thread
- Array Cell Function Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Problem loading .wav files in matlab from directory
Hello participants. Can anyone help me in the code of loading wavs... I am getting some error... Function for the Code is... function [wavs,fs] = load_wavs(directory) % Initialize variables data = 0; fs = 0; % Load the wavs if(nargin < 1), D = dir; else D = dir(directory); end for i=2 ...- Jamshaid3
- Thread
- files Matlab
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
Can Vector Loops Simplify Theo Jansen's Linkage Mechanism Equations?
I'm studying the work of Theo Jansen and want to derive a set of general equations for motion, velocity and acceleration at each point of his linkage mechanism. I've read a general equation can be derived through the use of vector loops but I am having some trouble as my equations have 10...- Jawz
- Thread
- Loops Matlab Matrix Octave Vector
- Replies: 2
- Forum: Other Physics Topics
-
E
MATLAB How can I optimize my MATLAB code for faster Fourier series plot?
Hi! Here is my m-file for Fourier series plot: clear clc syms n a0=input('Enter coefficient a0: '); an=input('Enter coefficient an: '); bn=input('Enter coefficient bn: '); a=input('Enter lower boundary: '); b=input('Enter upper boundary: '); t=linspace(a,b,10000); sum=0; for n=1:10 %%n could...- etf
- Thread
- Fourier Fourier series Matlab Plot Series
- Replies: 12
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
D
MATLAB Sampling with replacement in Matlab
I am trying to simulate the probability of rejecting a good batch for a probability of \(0.94\) using the Binomial Probability Law. My two cases are \[ P[k\geq 95] = \sum_{k = 95}^{100}\binom{100}{k}p^k(1 - p)^{100 - k} \] and \[ P[k\geq 98] = \sum_{k = 98}^{100}\binom{100}{k}p^k(1 - p)^{100 -...- Dustinsfl
- Thread
- Matlab Sampling
- Replies: 9
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Concentration of CO in Los Angeles Basin (matlab)
Homework Statement Smog begins to build up again immediately after a Santa Ana wind passes through the basin. The volumetric flow rate through the basin has dropped to ##1.67*10^{12} \frac{ft^3}{hr}##. Plot the concentration of carbon monoxide in the basin as a function of time for up to 72...- gfd43tg
- Thread
- Concentration Matlab
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
D
MATLAB Matlab estimate PDF from random variable X
How do I estimate the pdf from a random variable \(X\) where \(X = U_1 - U_2\) and \(U_i\) are uniform random variables? In the code below, I used unifrnd(-5, 5, 1000, 1) which generated a 1000x1 vector of uniform random number between -5 and 5. How do I estimate the PDF for X? rng; X =...- Dustinsfl
- Thread
- Estimate Matlab Pdf Random Random variable Variable
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
X
3-Level Rate Equation modelling using Matlab
Hello everyone, I'm new here and new to Matlab. I hope I do place the post in the right place. First of all, thanks for viewing my post. Please bear with my English. I tried my best to explain everything clear. If you have any question about anything I wrote or spot any fault, please tell...- xzyan
- Thread
- Matlab Modelling Optics Rate
- Replies: 10
- Forum: Advanced Physics Homework Help
-
G
Solving Matlab Homework Problem - Index Out of Bounds Error
Homework Statement hi, i am having some problem with a code in matlab. my code is: t = 30; H= 30; h= 3; n = H/h; qqq= 10; a= 3; b = .2; k= 0.04; Lo= 100; g= 9.81; for i = 1:t q(i) = 0; for j = 1:n nl = qqq + (j*h)/(a + b*(j*h)); nlt = nl*(0.0172*log(i) + 1); q(i) = q(i) +...- gsb
- Thread
- Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
R
Making Bode Amplitude Plot of LC Filter in Matlab
Homework Statement I'm trying to make a theoretical Bode Amplitude plot of the following circuit in Matlab: The transfer functions is given by ##T=\frac{V_{out}}{V_{in}}=\frac{R_2}{R_2+z_p}## ##z_p=R_p|| j \omega L || \frac{1}{j \omega C} = \frac{R_p}{1+ j R_p (\omega C -...- roam
- Thread
- Filter Lc Matlab
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
T
MATLAB Model a circle using finite difference equation in matlab
hello. I have a MATLAB skeleton provided because i want to model a distribution with a circular geometry. all in all, i want the 3d graph of the code to be some type of cylinder. This is the code: % flat step condition for ii=1:nHi, for jj=1:nHj, if (X(ii)/R_P)<1 &...- tomallan
- Thread
- Circle Difference Difference equation Finite Finite difference Matlab Model
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
MATLAB Verifying Fourier Series In MATLAB
HI please help me this could someone verify it for me please find attachement clc; clear all; k=0; s=0; N=inf; for i=1:N s=s+(1/(k^2+1)); k=k+1; end syms x n a0=1/pi*int(cosh(x),-pi,pi); an=1/pi*int(cosh(x)*cos(n*x),-pi,pi); bn=1/pi*int(cosh(x)*sin(n*x),-pi,pi); fs=0...- Jovany_17
- Thread
- Fourier Fourier series Matlab Series
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB A differantial equaton to be solved using matlab
I want to solve the following differential equation using MATLAB and thus want to plot between x & y. dy/dx=(l*siny-b)/(sinx*cos(y-x)) boundary condition:at x=0;y=sine inverse of(b/l);- HP007
- Thread
- Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
R
Bode Plot Matlab Homework: High Pass Filter
Homework Statement I'm trying to make a theoretical Bode plot of a High pass filter (made up of a capacitor and a resistor). The transfer function is: ##T=\frac{V_{out}}{V_{in}}= \frac{R}{R+1/(j\omega C)} = \frac{1}{1-j\omega_0 / \omega}## With a corner frequency of 5 kHz or in...- roam
- Thread
- Bode Bode plot Matlab Plot
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
Area in shades region (Matlab)
This is a part MATLAB and part math question. I know for the shaded region, I would usually do ##A_{shaded} = \int_{inter(2)}^{inter(3)} f_{1}(x) \mathrm{d}x - \int_{inter(2)}^{inter(3)} f_{2}(x) \mathrm{d}x## However, since it appears they want the function handle to be just one line, am I...- gfd43tg
- Thread
- Area Matlab
- Replies: 1
- Forum: Calculus and Beyond Homework Help
-
Dice Rolling probability (matlab)
Homework Statement In this problem, we will demonstrate the Central Limit Theorem by a virtual test that involves rolling of dice. To this end, you will create a function, with the following declaration line function [avgDice, histDice] = rollDice(NumDice, NumRolls) ##\bullet## NumDice: the...- gfd43tg
- Thread
- Dice Matlab Probability Rolling
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
W
Overplotting 6 graphs by changing into 3 graphs in MATLAB
Two M-files one contains differential equations and another one to run and plot the graphs. since i am using ode solver, it has two files to run. THERE ARE 4 MATLAB CODES WITH 4 SEPARATE MATLAB M-FLIES BUT 2 M-FILES TO PRODUCE 3 PLOTS AND ANOTHER 2 M-FILES TO PRODUCE ANOTHER 3 GRAPHS. BUT I...- wel
- Thread
- Graphs Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
Cell Array manipulation (matlab)
Homework Statement Write a line of MATLAB code that uses the cell array A to generate the string 'Cal Golden Bears'Homework Equations The Attempt at a Solution A = {'Cal', 'Golden', 'Bears', [5 7], {[1 2 3 4]}} A = 'Cal' 'Golden' 'Bears' [1x2 double] {1x1 cell} The...- gfd43tg
- Thread
- Array Cell Manipulation Matlab
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
D
Please help with script in matlab (avoiding objects in a matrix)
[b]1. The problem statement. Create a function in MATLAB for a simulation of a automated robot vacuum to avoid obstacles while cleaning an undisclosed floor plan. the floor plan which will be in the form of a matrix not known beforehand. The robot (represented by a value of 1) can move...- dtrent258
- Thread
- Matlab Matrix
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
Why am I only getting 4/24 points on my Truss analysis with Matlab?
Hello, I have been working on this Truss problem and have not managed to get it right. I have checked my equations over and over and everything seems to check out, but I only get 4/24 on the autograder. Here is my paper worked out. Here is my Code. Because I don't like the opposite sign...- gfd43tg
- Thread
- Analysis Matlab Truss
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
W
Matlab, how to know time step size in the plot or how can i get the ou
Since i am using MATLAB ode23s solver, it contains two MATLAB files . One contain the differential equations and another contains plotting and to run the m-files. The code are working perfectly. Now i want to know the time step size that is using on the plot. How can i get the output of time...- wel
- Thread
- Matlab Plot Time
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
How to Fix Word Index Errors in MATLAB?
Homework Statement I am working on Problem #2 in the attached PDF Homework Equations The Attempt at a Solution When I run this right now, I get an error in my first conditional for if the word is not in the index. How do I say that the word does not exist in the index? Any other...- gfd43tg
- Thread
- Index Matlab
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
W
MATLAB MATLAB Simulation of Fraunhofer Diffraction
Hello, I am using MATLAB to simulate a Fraunhofer diffraction pattern for a given aperture, but I have a little question. Hope someone can help. Sorry I am just a high school student and does not completely understand all mathematic deductions about Fraunhofer Diffraction on Wikipedia. I...- wybmax
- Thread
- Diffraction Fraunhofer Matlab Simulation
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB Computing normalized oscillator states for very large N (Matlab)
Hi everyone, I have a rather fundamental question about building oscillator wavefunctions numerically. I'm using Matlab. Since it's 1/√(2nn!∏)*exp(-x2/2)*Hn(x), the normalization term tends to zero rapidly. So for very large N (N>=152 in Matlab) it is zero to machine precision! Though asymptotic...- srihari83
- Thread
- Computing Matlab Oscillator States
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
User-defined function to decrypt/encrypt messages (matlab)
Homework Statement I am working on Problem #2 in the attached PDF Homework Equations The Attempt at a Solution I am trying to understand what they are saying in (b) as far as creating the double array. Does that mean I concatenate strIn with keyL? Also, how do I remove the last...- gfd43tg
- Thread
- Function Matlab
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
M
MATLAB A question on linear algebra(also Matlab related)
Hi, Can someone explain me the division operation in the picture. First for left division we use (.\ ) not only ( \ ) And it is strange that when we divide first column of A by first column of B( here first column of B is 44) how can we find -5.1250 ?- mech-eng
- Thread
- Linear Matlab
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Triple redundancy sensor matlab code
Homework Statement Hardware redundancy is important in many real-world engineering systems. Specifically, installing multiple sensors that measure the same quantity provides a level of safety in the event that one instrument fails during the mission lifetime. You do not want an expensive...- gfd43tg
- Thread
- Code Matlab Matlab code Sensor Telescope
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
Compute Kronecker Product of Two Arrays in MATLAB - Step-by-Step Guide
Homework Statement In this problem, you will write code that computes the Kronecker product of two arrays. Suppose A is a numeric array of size r-by-c and B is a numeric array of size n-by-m. Then the Kronecker product of A with B is a numeric array, of dimension rn-by-cm, defined as:Homework...- gfd43tg
- Thread
- Kronecker product Matlab Product
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
Loops to create an array (matlab)
Homework Statement Attached imageHomework Equations The Attempt at a Solution I am basing my code off a template I found in a textbook for using loops to create an array. If I didn't find this example I don't think I would even know where to begin with this. Here is what I came up with so far...- gfd43tg
- Thread
- Array Loops Matlab
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
Compound interest loops problem (matlab)
Homework Statement (a) Suppose you decide to invest money in a Certificate of Deposit (CD). Write code that assigns to the variable FinalValue the final value of the CD based on the following variables: Investment: the initial amount of money invested in the CD, Rate: the annual...- gfd43tg
- Thread
- Compound interest Interest Loops Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
W
Solving Non-linear System of 3 diff eqns using ode23s in matlab
I am trying to solve 3 differentail equations(Lorenz equations) using ode solver: ode23s in Matlab. Here are the 3 lorenz equations: dc/dt= alpha*I*(1-c) + c*(- k_f - k_d - k_n * s - k_p*(1-q)) ds/dt = lambda_b * c* P_C *(1-s)- lambda_r *(1-q)*s dq/dt = (1-q)* k_p * c *(P_C /...- wel
- Thread
- Matlab Non-linear System
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
How to Validate User Input in MATLAB?
Homework Statement Often times, a program accepts input from a user, and needs to check the validity of the input, and then produce useful and informative error messages if the input is invalid. Suppose that uiVal is a variable representing the user's input, and that errorCode is an 1-by-0...- gfd43tg
- Thread
- Conditional Matlab Operations
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
Test Score relational operators MATLAB
Homework Statement Hello, I am working on problems 6-14 on the attached PDF. Don't be scared off, they are just one line of code each. I got number 6 correct, and I got partial credit on 7 and 8, but I am trying to figure out why it is not right. Homework Equations The Attempt at a...- gfd43tg
- Thread
- Matlab Operators Test
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
W
Newton-Raphson Method for Non-linear System of 3 variables in Matlab
I am trying to solve 3 non-linear system of 3 variables using the Newton-raphson method in matlab. Here are the 3 non-linear equations: \begin{equation} c[\alpha I+ k_f+k_d+k_ns+k_p(1-q)]-I \alpha =0 \end{equation} \begin{equation} s[\lambda_b c P_C +\lambda_r (1-q)]- \lambda_b c P_C =0...- wel
- Thread
- Matlab Method Non-linear System Variables
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
Optimization with constraints matlab
Homework Statement Just a heads up, this is a problem with parts (a) - (o). I am working on (k). I am working on problem 5 in the attached PDF. I will show my code for the other parts. We were told to use N = 5 while writing the code for debugging and testing, but run N = 500 for the real...- gfd43tg
- Thread
- Constraints Matlab Optimization
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
R
MATLAB Newton-Raphson Method for Non-linear System of 3 variables in Matlab
I am trying to solve 3 non-linear system of 3 variables using the Newton-raphson method in matlab. Here are the three equations: \begin{equation} c[\alpha I+ k_f+k_d+k_ns+k_p(1-q)]-I \alpha =0 \end{equation} \begin{equation} s[\lambda_b c P_C +\lambda_r (1-q)]- \lambda_b c P_C =0 \end{equation}...- ra_forever8
- Thread
- Matlab Method Non-linear System Variables
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
C
Matlab: automated ommitting of letters from mutiple file names
Forgive me if this sounds really stupid. I am a new Matlab user, and I have about 200 data sets from various samples in the naming format "varname_sample_daily" and i wish to remove the "daily" portion of it from the variable name through an automated process (i.e change all file names to just...- chowjonathan
- Thread
- Automated File Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
Matlab changing word in character array
Homework Statement Let sentence1, string1, and string2 be three variables whose values are character strings. Using only the MATLAB function strfind and array concatenation, write code that will replace the first occurrence of string1 in sentence1 with string2, assigning the result to...- gfd43tg
- Thread
- Array Matlab
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
Index notation matlab for 2D array
Homework Statement Homework Equations The Attempt at a Solution Hello, I am having some confusion over the notation used in matlab. I don't really know what they mean A = [1:3; 4:6; 7:9] A = 1 2 3 4 5 6 7 8 9 A(1:2, 1:2) ans = 1 2...- gfd43tg
- Thread
- 2d Array Index Index notation Matlab Notation
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
N
MATLAB Troubleshooting MATLAB dmcode in R2013a
I have MATLAB R2013a. I am wondering why dmcode will not work.- nikki92
- Thread
- Matlab Troubleshooting
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
How to Solve Laser Rate Equations Using Matlab?
Hi, is there anyone familiar with rate equation solving using Matlab? I need help on this- mya246
- Thread
- Laser Matlab Rate
- Replies: 9
- Forum: Advanced Physics Homework Help