Matlab Definition and 1000 Threads
-
N
MATLAB Matlab multiplication of polynomials with syms
Is there anyway around this problem? syms m,n; x1 = [0, 1, 4, m]; x2 = [3, n, 9, 27]; conv(x1,x2) Undefined function 'conv2' for input arguments of type 'sym'- Ngineer
- Thread
- Matlab Multiplication Polynomials
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Synchronous generator matlab simulation
I want a closed loop MATLAB simulation for a case study in power grid control: I'm planning to regulate the terminal voltage of a synchronous generator on overloading, by measuring the terminal voltage instantaneously, giving it to a rectifier and feeding the DC signal to the exciter (instead of...- mihnath
- Thread
- Generator Matlab Simulation Synchronous
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
MATLAB Solve Matlab Code Problem: Nonlinear Fiber Optics
I took this code from the agrawal book: nonlinear fiber optics and I wanted to see the results : %---specify input parameters clear all; distance= input('enter fiber length (in units of L_D)= '); beta2=input(' dispersion: 1 for normal, -1 for anomalous'); N=input('Nonlinear parameter N=')...- eahaidar
- Thread
- Code Matlab Matlab code
- Replies: 14
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
Difference rand and randn command matlab
i am confused between when to use rand and randn . can someone explain to me please?- eltrinco
- Thread
- Difference Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB Solving MATLAB Duplication Error with For Loop
Hi, I'm totally new to MATLAB and tried this for loop for K = 1:10 disp(abs(tan(K))) end it displays 1.5574 2.1850 0.14255 1.1578 3.3805 0.29101 0.87145 6.7997 0.45232 0.64836 1.5574 2.1850 0.14255 1.1578 3.3805 0.29101 0.87145 6.7997 0.45232 0.64836 Why did it display...- Superposed_Cat
- Thread
- Error Matlab
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Q
MATLAB [Matlab] Numerical Code for the NLS equation
hello i just copied the Numerical Code for the NLS equation which is the following: %---specify input parameters clear all; distance=input('enter fiber length(in units of L_D)='); beta2=input(' dispersion: 1 for normal, -1 for anomalous'); N=input('Nonlinear parameter N=')...- queenstudy
- Thread
- Code Matlab Numerical
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
Rotate Point in Matlab Plotting
Homework Statement i need to fix a point and rotate another one Homework Equations The Attempt at a Solution i did this i've created this: x=rand(1,3) y=rand(1,3) scatter(x,y) how do i select and make one point fix and make the other point rotate around it?- eltrinco
- Thread
- Matlab Plotting Rotate
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
E
How can I create and manipulate multiple points in MATLAB?
Homework Statement i had some problem with MATLAB of how to create two points of random positions and adding another few random pointsHomework Equations how to create the points, set a point as the centre, make the iteration for one point to rotate the centre and also the other iterations for...- eltrinco
- Thread
- Matlab Points
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
V
MATLAB Maximizing the fraction of two integrals using matlab
EDIT: I left out something of major importance, I want to maximize with respect to a! Good day, I've run into an issue in solving a certain problem with matlab, and I was hoping if anyone could help me out. I am relatively new to matlab, so I don't even know if this is possible, but I...- Verdict
- Thread
- Fraction Integrals Mathematica Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB question re interpolation and approximating derivative.
Hi, I'd sincerely appreciate it if someone were willing to review the few lines of MATLAB code below and indicate why they don't quite yield the expected output. Homework Statement I am asked to generate using MATLAB approximated values of f(x)=cos(x) at nodes x+h,x-h with random errors...- peripatein
- Thread
- Derivative Interpolation Matlab
- Replies: 13
- Forum: Engineering and Comp Sci Homework Help
-
M
MATLAB MATLAB Script Help - Plotting 2 Functions to Find Intersection
Attahced is my short MATLAB script, I am basically trying to use iteration to plot 2 sets of 2 functions to see where they intersect, all other information in the script are constants. attached also is the incorrect graph that i get flux = F If = Ifield Any help would be appreciated- MMCS
- Thread
- Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Need some guidance - Graphing in Matlab
Need some guidance -- Graphing in Matlab Hello, I am doing a project using Matlab. I need to generate this graph as shown in the attachment. For the gas and liquid superficial velocity, I am able to find the equation but as for the Flow pattern transition boundary equation(the darker lines), I...- MissUncertain
- Thread
- Graphing Guidance Matlab
- Replies: 9
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Irritated by Matlab should I retake the course?
Hey fellas how are you all doing? This is my first year as an engineering student and so far I am enjoying most of my classes(Math, chem, programming) except for one, my MATLAB class. This class is really a pain in my ***. This is my first time seeing a programming language and I have a grade...- Metta
- Thread
- Course Matlab Retake
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB How to Resolve a Plotting Error in Matlab?
HI, i have a set of data that i want to plot with matlab, using an equation. i have all x data points and want to generate y values for each x data point. function y =marko(x) y= (4.11/1.98)*{(1/4*((1-x/L).^2))-(1/4)-(x/L)}; x=(218+data points) from the command window i have...- solas99
- Thread
- Matlab Model Plotting
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
Solving Matlab Newton's Method Homework
Homework Statement So, I've written a program that carries out Newton's method. The root of the equation which I am trying to find is approximately 13.1. This is fine and my program returns the correct value when my initial guess is around this value (up to about x = 50 as my initial guess)...- SherlockOhms
- Thread
- Matlab Method Newton's method
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
S
MATLAB [Matlab] Subscripted assignment dimension mismatch.
Hi all, I have the following program, but with this error [Subscripted assignment dimension mismatch. Error in test_vlf_spherical (line 62) ep(i,j)=ga(i,j)*ep(i,j)+gb(i,j)*((1./r(i)./dr)*(rph*hr(i,j)-rmh*hr(i-1,j))...] i am trying to solve the problem by using (./) but i...- s_hy
- Thread
- Assignment Dimension Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
E
MATLAB How can I calculate THD using MATLAB?
Hello, I'm a novice in using MATLAB. I want to calculate THD value from my experimental data using MATLAB. I have 10,001 data points, sampling frequency is 100kHz and fundamental frequency is 50 Hz (I'm not in USA). Below is my code. Could you please check that my code is correct or not ...- EE86
- Thread
- Calculation Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB MATLAB - Calculate distance/perimeter of an object in 2D image
Hi, I want to find out how thick/big/fat is the object in the image. For example, there is a tree in the image(photograph), I want to use MATLAB to calculate how big the tree trunk is. Problem: Find out the perimeter of trunk as shown in the first picture (named "perimeter.PNG". attached...- Ping Ong
- Thread
- 2d Image Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
O
MATLAB Mastering Matlab for Bode Plots: Understanding Transfer Functions Easily
Hello I need to do bode plot.. but i not to sure how to use matlab.. i need this 1 / (a + bs)s num = 1 how to key in the den to get (a + bs)s.. i try different way and i can't get 1/(a+bs)s hope to get help- onceinalifetim
- Thread
- Function Matlab Transfer function
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB - forming an array of sums?
Hi, Homework Statement I am asked to evaluate the following sum S=Sigma(n=0 to N) x^n/n! (namely, e^x as n->Inf) for N=10:10:100 and x=10, so that every element S(i) is a partial sum which approximates function e^x with different accuracy. Below is my code, which doesn't work. Homework...- peripatein
- Thread
- Array Matlab Sums
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
T
Matlab help. invalid target for assignment trying to solve
Homework Statement hey there, i'm trying to solve for beta which I tought i'd easily be able to figure out using MATLAB (i'm not the most proficient MATLAB user) but i can't get it to work.. Homework Equations The Attempt at a Solution My code is as follows: clear all...- tigertan
- Thread
- Assignment Matlab
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB Mastering Newton's Method and Graphing in Matlab: A Step-by-Step Tutorial
Hey guys, I have to make some graphs for an assignment and a friend told me it would be easiest with matlab. I need to make an x(k+1) vs. x(k) graph for Newton's method as well as the Chord method. I also need to make a few charts of the discrete logistic equation. Plotting functions isn't...- twoski
- Thread
- Matlab Method Newton's method
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
I
Why isn't MATLAB producing graphs for my program?
Homework Statement Hello there. I ran a MATLAB program and i can't produce any graph. Please help me Homework Equations This are the program L = 1.; T = 1.; maxk = 2500; dt = T/maxk; n=50; dx = L/n; cond = 1/4; b = 2.*cond*dt/(dx*dx); for i= 1:n+1 x(i) = (i-1)*dx; U(i,1) =...- iwan89
- Thread
- Graph Matlab
- Replies: 4
- Forum: Calculus and Beyond Homework Help
-
S
User Defined Functions in MATLAB
Homework Statement Write a user-defined function that calculates grade point average (GPA) on a scale of 0 to 4, where A = 4, B = 3, C = 3, D = 1, and E = 0. For the function name and arguments use av = GPA(g,h). The input argument g is a vector whose elements are letter grades A, B, C, D...- samuel1994
- Thread
- Functions Matlab
- Replies: 8
- Forum: Engineering and Comp Sci Homework Help
-
L
MATLAB Programming Loops Question
Homework Statement Write a program that does the following: Prints the four gases on the screen and asks the user to select which gas to find the heat capacity for. Asks the user for a temperature. Asks the user if another temperature is needed (enter yes or no). If the answer is yes...- lee_sarah76
- Thread
- Loops Matlab Matlab programming Programming
- Replies: 7
- Forum: Engineering and Comp Sci Homework Help
-
M
MATLAB Polymath or Matlab non-linear algebraic solver
Hello, I am having difficulty inputting a non linear algebraic equation into polymath to solve for reference the equation is x*(100-.5*x)^0.5/(15-x)/(20-.5 * x)^0.5 - 87.824 == 0 and I want to solve for x, but haven't gotten anything. Also I don't know how to program it into matlab...- member 392791
- Thread
- Matlab Non-linear
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Matlab transfer function problem
I have a transfer function L(s) = A(s)/B(s) that I call Ls. However, when defining H(s)= L(s)/(1+L(s)) by %% Ls = -70.6s^2 - 2003 s + 3375 -------------------------- s^3 + 119.6 s^2 + 2806 s %% Hs = Ls / (1+Ls) things go wild. The highest...- MechatronO
- Thread
- Function Matlab Transfer function
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Plot the equation y=cos(A*x) + i*sin(A*x) in MATLAB
Hi Everyone, I am a new Matlab User, I am want to plot the equation y=cos(A*x) + i*sin(A*x) where A = 400*pi/340 and want to plot y and vary x from pi:0.1:pi clear all; close all; A = 400*pi/340; x = -180:0,1:180; a=cos(A*x); b=i*sin(A*x); i= imag(b); hold on; grid...- mtirmize
- Thread
- Matlab Plot
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB Probability at Party function.
Homework Statement So, you're asked to write a function that computes the probability of two people at a party having the same birthday. The probability function itself is P(n) = 0, n = 1 P(n) = 1 - (capital pi from k = 1 to k = n - 1)(1 - k/365), 2 <=n <= 365 P(n) = 1, n >= 366 The...- SherlockOhms
- Thread
- Function Matlab Probability
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
R
MATLAB Skin effect derivation and plotting in Matlab
This is driving me crazy. The derivation of the current distribution in a long cylindrical wire is extremely straightforward, giving J(r) = J(a) \frac{J_0(k r)}{J_0(k a)} where J is the current density, a is the radius of the wire, and k is the complex wave vector, which in a metal (with...- RGann
- Thread
- Derivation Matlab Plotting Skin Skin effect
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
N
MATLAB Plotting cosine in matlab looks really funky
I have to plot a bunch of cosine waves and then add them up but my problem is that each indiviudal wave looks really weird when I plot and not like a cos wave. The program runs and plots the final result but I'm not sure how accurate it is because when I plot each individual cos wave I know it...- nabeel17
- Thread
- Cosine Matlab Plotting
- Replies: 9
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB Create B-Spline curve using MATLAB
I need a MATLAB expert to guide me on how to create a b-spline curve using MATLAB Software. I understand the B-spline basis function calculations for zeroth and first degree but I have no idea on how to calculate for the 2nd degree. I need a favor on that part. I am currently working on my...- Praba89
- Thread
- Curve Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
Using Tic Toc in MATLAB for Calculating Sum with Loops and Vectorised Commands
Homework Statement Calculate the time taken to compute sum of 1/k^3 from 1 -> 1000 using both loops and vectorised commands using tic toc. Homework Equations The Attempt at a Solution tic n = 1e3; % number of terms in the sum s = 1...- SherlockOhms
- Thread
- Matlab
- Replies: 12
- Forum: Engineering and Comp Sci Homework Help
-
S
MATLAB Matlab - matrix with blank space
r=zeros(1,6); r(1,2:4)=2; r(1,5)= - rfor the above program, I want the output as r= 0 2 2 2 - 0 how to do this in matlab? please help- Suvadip
- Thread
- Matlab Matrix Space
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB Solving an Argument in MATLAB with Linprog
Dear All Firstly, thank you for looking at my post. I am so close to a solution to a problem that has been given me a massive headache. I am also very stupid and was wondring if one of smart guys could take a look at my problem and see if you might be able to help. I am trying to...- physical101
- Thread
- Argument Matlab
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB Can You Nest If Statements in MATLAB?
Just started a new college module and we'll be using MATLAB quite a bit. I was wondering, can you nest if statements in MATLAB like in C#? Would code such as this work in MATLAB? if (condition 1) if (sub condition 1) Code elseif (sub condition 2) Code elseif (condition...- SherlockOhms
- Thread
- Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
B
MATLAB Need help plotting Fourier series in matlab
Hi all my first post as I need to seek help! I have just learned some simple Fourier series stuff and would like to be able to plot my answers in matlab. Assuming this is correct I was wondering if someone would be able to walk me through plotting this equation in Matlab...- BigDave11
- Thread
- Fourier Fourier series Matlab Plotting Series
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
T
Matlab help. Using Newton Raphson
Homework Statement Two forces P and Q are applied at the end of a screw eye in order to remove the post. Homework Equations The two equations that were found are 1.) Q*sin(30)-P*sin(θ)=0 2.) Q*cos(30)+P*cos(θ)-800=0 The Attempt at a Solution I combined the 2 equations by first...- thekkid33
- Thread
- Matlab Newton
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
B
MATLAB Doing a phase-space portrait in matlab
So I have this system of equations: \binom{x_{n+1}}{y_{n+1}}=\begin{pmatrix}e^{r} & 0 \\ 0 & e^{-r} \end{pmatrix}\begin{pmatrix}cos(\phi+I_{n}) & -sin(\phi+I_{n}) \\ sin(\phi+I_{n}) & cos(\phi+I_{n}) \end{pmatrix}\begin{pmatrix}x_{n}\\ y_{n} \end{pmatrix} where I_{n}=x_{n}^2+y_{n}^2...- bagram
- Thread
- Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB Excel date column export into Matlab
Hi everybody, I need assistance. I have excel file that conntains a date column and another column. I wish to plot the date on x-axis and the second column on y axis. I wrote the MATLAB code below. This is my code. data=xlsread('DataTest','Sheet1'); q=data(:,2); time=data(:,1); Error...- adeeyo
- Thread
- Column Excel Matlab
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB Histogram coloured by different hues in matlab
Dear Physics fans, Are we all okay? I hope so. I was wondering if you could help me please? I am banging my head against a wall in MATLAB and I think what I need to do should be very easy. I have a histogram of intensities and I could like to colour then starting off at black and...- physical101
- Thread
- Histogram Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
N
MATLAB Understanding Positive Feedback in MATLAB
Hi All, Suppose I have the following system: A = 1 / (S + 1) (open loop) B = S / (2S + 1) (feedback path) I know that the positive feedback closed loop system will thus be: A / (1 - AB), and entering this manually in MATLAB (as well as doing it by hand), I get: 2 s^2 + 3 s...- nand_1
- Thread
- Feedback Matlab Positive
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB Solving MatLab Misunderstanding: Element-by-Element and Point-wise
[SIZE="4"][FONT="System"]I'm current learning MatLab before i start my second year of engineering and i don't really understand a fundamental aspect of it. My problem is the use of the period "." and when it is deemed to be necessary. I've looked up what this operator does and found...- steve2510
- Thread
- Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Finding the sum of multiples of 3 and 5 below 1000 (Matlab)
Homework Statement Project Euler Problem 1. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. Hello, there I do understand what a multiple is, and...- miniradman
- Thread
- Matlab Sum
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
H
MATLAB Cavity simulation on matlab with spatially dependent phase
Hello there, I have been searching for MATLAB simulations that analyze optical cavities and there are some useful codes. Yet, I haven't found codes that analyze what happens to cavit transverse modes if spatially dependent phase is introduced between mirrors Does anybody know if there...- hangainlover
- Thread
- Cavity Matlab Phase Simulation
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB How to find covariance matrix of 3 or more vectors in matlab?
Hi all, I know how to find covariance of 2 vectors and variance too. If covariance matrix is to be found of 3 vectors x,y and z, then then the cov matrix is given by cov_matrix(x,y,z) =[var(x) cov(x,y) cov(x,z); cov(x,y) var(y) cov(y,z); cov(x,z) cov(y,z) var(z) ]; Is this...- dexterdev
- Thread
- Covariance Covariance matrix Matlab Matrix Vectors
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Matlab - area values into raster data
I'm trying to transform area values into raster data. I have areas, defined as circles (location of center + length of radius). Each area has a designated value between 0 and 2. I used Matlab's command area to plot the areas and also to designate the value that goes with each area. Now I want...- MartinV
- Thread
- Area Data Matlab
- Replies: 6
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
D
MATLAB A simple symbolic expression in Matlab
I tried to check x²-1 = (x+1)(x--1) So I did the following: Matlab returns 0. Any suggestions? :) (Matlab beginner by the way)- Dr_Pill
- Thread
- Expression Matlab
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
B
How to Compute Convolution Using FFT in Matlab?
Homework Statement You have two functions in Matlab (represented as column vectors). Compute their convolution using the fast Fourier transform. Homework Equations The Attempt at a Solution I am having trouble finding a book with this topic. I would like to know where the...- bjnartowt
- Thread
- Code Convolution Fft Matlab
- Replies: 7
- Forum: Advanced Physics Homework Help
-
M
MATLAB Geographical points + great circle = ellipse? (Matlab)
I'm doing this in Matlab but it's not restricted to any particular software. I have a bunch of geographical points (x,y coordinates for each) and I want to take all the points that are 50 km or closer to the reference point. I took the great-circle equation to convert geographical longitude...- MartinV
- Thread
- Circle Ellipse Matlab Points
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX