# matlab

1. ### Partial Differential Equation

Help please, I need to solve this differential equation x\frac{\partial^2 U}{\partial x^2}+y\frac{\partial^2 U}{\partial y^2}=aU in Matlab (where "a" is a constant parameter, it can be taken by any), I wanted to use the Partial Differential Equation Toolbox, but I ran into a problem, the...
2. ### How to choose Eigenvaues for system extending in perpendicular direction?

I have two linear third order ODEs with a separation constant (eigenvalue parameter) on a rectangular domain where $x \in (0,1)$ and $y \in (0,1)$as follows: I have two linear third order ODEs with a separation constant (eigenvalue parameter) on a rectangular domain where $x \in (0,1)$ and \$y...
3. ### Matlab Plotting Euler Iteration Against Exact Solution how to Set Initial Condition

Hi I have the following code to plot an approximation using Euler's iteration against the exact value of the function. I have used x and y for time and population when coding the Euler iterations and t and m for time and population when plotting the exact function. I can't work out how to...
4. ### MATLAB technical issues - computer going out the window soon!

Hi I had major problems with MATLAB so uninstalled and reinstalled the program. The first time it reinstalled however I got the same error messages. I checked java and deleted old matlab files (I have a backup of important programs) and now I am getting an error message that I have attached a...
5. ### V. simple Matlab plotting question

Hi, As part of a bigger question I have to create a simple plot in Matlab. Could anyone tell me where I am going wrong in the simple script below: %Test Plot x=-2:0.01:4; D=sqrt(x.^2+(x.^2-2*x-4).^2); Plot(x,D); Kind regards Beetle
6. ### V simple graphing in Matlab Questions

Hi, As part of a bigger question I have to create a simple plot in Matlab. Could anyone tell me where I am going wrong in the simple script below: %Test Plot x=-2:0.01:4; D=sqrt(x.^2+(x.^2-2*x-4).^2); Plot(x,D); Kind regards Beetle
7. ### How to write Matlab code for this PDE problem?

Hello, so I have this problem and I did not receive full credit on it and I would love to have the correct answer for future problems. I attached an image of the problem and what I had and I could never get my code to run so any help is appreciated. Thanks! dx = 1e-2; dt = 1e-5; u(x,0) =...
8. ### Matlab Questions - dice game

Hi, I have the following problem and very little idea where to start! "Consider the following game: Each of two players rolls a dice and whoever rolls thehighest number (between 1 and 6 inclusive) gets 4 points, and if it is a draw, both players get2 points. The player with the highest number...
9. ### Matlab Problem Question

"Consider the following game: Each of two players rolls a dice and whoever rolls thehighest number (between 1 and 6 inclusive) gets 4 points, and if it is a draw, both players get2 points. The player with the highest number of points after 10 rounds of the game is the winner(or the game could be...
10. ### Matlab and Newtons method

Hi, i have to to use newtons method to solve for a zero solution of f(x) = x-e^-x^-2. I get the iteration formula: x(k+1) = xk - f(xk)/(f'xk) and a first guess that x(0) = 0.5. can anyone help me write the code for the next iterations (does it contain a for loop?) i am am new to calculus...
11. ### MATLAB - are people using this?

Hi, I am returning to study after a very long time! I was wondering is anyone here is using MATLAB. I know it is supposed to be easy however am having trouble... For example: Two different moulds grow at different rates. The mass of the first mould (in grams)is well described by the...
12. ### MATLAB Question - Entering recursive definitions

Hi Thanks to all that have helped me so far. I have a question regarding Matlab if anyone can help: My question asks me to write a recursive definition from a word question: the recursive formula is: w(n) = (8000 - (250n/(n+1)) x 0.02 At this point I am a little confused as to whether...
13. ### I extremely need help with the codes for this MATLAB project

I need help with this project in MATLAB 1. Represent while marking on the axis the significant values for the signals x1(t), x2(t) and x3(t) for 10 periods, 20 periods and 40 periods. (you should use the vectorial method). x1(t)=10t^2-8t+14 for t included in the domain [o;30] [ms]...
14. ### I extremely need help with the codes for this MATLAB project

1. Represent while marking on the axis the significant values for the signals x1(t), x2(t) and x3(t) for 10 periods, 20 periods and 40 periods. (you should use the vectorial method). x1(t)=10t^2-8t+14 for t included in the domain [o;30] [ms] x2(t)=x1(t)*dirac_T1(t); *=convolution; T1=30...
15. ### Matlab code: solve Helmholtz equation with SOR method

Hi, I try to solve Helmholtz equation with finite difference method and SOR method. But if I choose optimal value (B) not equal 1, I can't find that solution. (the answer is Inf) matlab code: nx = 6; ny = 6; dx=1/(nx-1); dy=1/(ny-1)...
16. ### solving 2nd order differential equation system in matlab

Hi I have to solve a 2nd order differential equation system(9*9) in matlab and I have some problems with it: eq1=f(x1,x2,.....,x9,x1'',x2'',....,x9'')=0 . . eq9 they are linear equations. The initial conditions: x1(0)=x2(0)=....x9(0)=0, x1'(0)=.....x9'(0)=0 One of the problem is when I want...
17. ### Matlab Genetic Algorithm for a non-genetic case

Hi! I've never used optimization tools, but now I need to. To make it simple to understand I will paste here the code that someone help me to accomplished using fminsearch. functionRaquel h = randi(24,8760,1); nd = randi(365,8760,1); veic = randi(333,8760,1); max_veic = max(veic); veicN =...

19. ### How to compare two vectors with their shapes and values? Using Matlab

Hi! I want to correlate two vectors not only in their shape but also considering their values in matlab. The functions i've searched (like, corrcoef/corr/corr2...) give the R-value, but that just consider the shape of the curve that the vectors represent, and i want to know also how close their...
20. ### MP3 decoder synchronization word using Matlab

Hi, I found this programming from a book entitled 'Analysis of the MPEG-1 Layer III (MP3) Algorithm Using MATLAB'. % P 6.1 – Seek the synchronization word and place the bitstream pointer function [bs, retval] = seek_sync(bs, sync, N) global ALIGNING maxi = round(2^N - 1); aligning =...