Matlab Definition and 1000 Threads

MATLAB (an abbreviation of "matrix laboratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages.
Although MATLAB is intended primarily for numeric computing, an optional toolbox uses the MuPAD symbolic engine allowing access to symbolic computing abilities. An additional package, Simulink, adds graphical multi-domain simulation and model-based design for dynamic and embedded systems.
As of 2020, MATLAB has more than 4 million users worldwide. MATLAB users come from various backgrounds of engineering, science, and economics.

View More On Wikipedia.org
  1. R

    MATLAB Frequency domain filtering in Matlab

    I am trying to implement several filters in Matlab for Fourier domain filtering. They are the cosine, Shepp-Logan, and Hann/Hamming window filters. These filters are defined as multiplying the ramp filter by the cosine function, sinc function, and Hann/Hamming windows respectively. This is how...
  2. F

    Algorithmic differentiation in unsteady heat equation

    Homework Statement Okey her we go I was given a base code called heat_equation_primer. The goal is to implement a optimizer into the program. The two methods that are going to be used is the Quasi-Newton and Steepest descent with search line. So I need gradients. So I tried to differentiate as...
  3. Arman777

    MATLAB Matlab Displaying the Fit Equation On graph.

    I have a lineer data and I want to write the equation of it on the graph. The x-axis is inverse distance (1/m) and I showed as "d" The y-axis is capacitance (C) and I showed it like "C" My data name is d_C Here my codes that I used for now >> d=d_C(:,1); >> C=d_C(:,2); >> plot(d,C,'go'); >>...
  4. M

    MATLAB Eliminate Noise from an Image in MATLAB

    Hi PF! Attached is a binary image I have in MATLAB, where I have drawn an error pointing to some noise. Does anyone know of a systematic way to eliminate all noise below this line (or basically what appears to be the line)? I also uploaded the same image only processed, titled Noise1. This...
  5. N

    How to calculate Time Delay Estimation?

    I have 2 data files, which links are attached below: Transmitted data https://www.dropbox.com/s/0nmhw6mpgh7upmv/TX.dat?dl=0 Received data https://www.dropbox.com/s/xgyo6le3bcmd25r/RX.dat?dl=0 Those binary data are read by this MATLAB code: %% initial values: nsamps = inf; nstart = 0; %% input...
  6. ThunderLight

    MATLAB How to spin the colormap in 2 different circles in matlab

    Hi, I'm trying to rotate 2 different plotted circles in matlab, which have the Jet colourmap. Colormap has the Spinmap function, but when I use it, it only spins the Jet colormap in 1 circle, leaving out the other. I would like to spin the Jet colormap in2 different circles in opposite...
  7. Arman777

    MATLAB Plotting Data with Matlab - Learn How to Code & Graph

    I have some datas from our physics experimetn and we have to plot them on matlab.Idk how to do them,I don't know how to write codes.Also I have to write of the axises and table names
  8. Sirsh

    MATLAB Issues Replicating Simulink Model within MATLAB (2DOF)

    Hey all, I've been trying to debug a model I've created of a 4DOF geared system within Simulink by reproducing the results in MATLAB going from a 2DOF upwards to verify the dynamics are acting correctly. At the moment I am purely trying to model the stiffness between two gears, my equations...
  9. S

    MATLAB Working out an equation on MATLAB using co-ordinates

    I have a series of data points for X and Y points on a graph. The data is quite random and I am trying to work out a trend line so I can then form an equation for the line. How would I go about working out the equation for the data below using MATLAB? (0, 580) (6.7, 495) (13.4, 445) (18.7, 365)...
  10. M

    MATLAB Working with Edge function in MATLAB

    Hi PF! Attached is an image I generated using the edge function in MATLAB (except the arrows, obviously). I would like to extract just the coordinates of the pixels from the bottom curve, which I've pointed at with arrows, and only in the domain between the red lines. Does anyone know how to...
  11. S

    I Working out the equation for coordinates on a graph

    I have a series of data points for X and Y points on a graph. The data is quite random and I am trying to work out a trend line so I can then form an equation for the line. How would I go about working out the equation for the data below. (0, 580) (6.7, 495) (13.4, 445) (18.7, 365) (22.8, 350)...
  12. JayFlynn

    MATLAB Plotting the tragectory of an asteroid in MATLAB

    I am trying to plot the trajectory of an asteroid in MATLAB using ode23. The only bodies in the system are The Sun, Earth, Mars and Jupiter and their orbital data has been loaded from data files. I have picked arbitrary initial conditions for the asteroid and believe my forces are correct. My...
  13. A

    MATLAB Python and MATLAB giving different results for same code?

    I am trying to learn Python by translating my MATLAB codes into Python. My translated Python code is giving slightly different result as compared to that of MATLAB. Although difference is very small but it affects largely the results at later stage. My Python code is import numpy as np import...
  14. Sirsh

    4DOF Spur Gear System - Eigenvalues not corresponding with the Eqns?

    Hi there, I am modelling a four degree of freedom system which is the dynamics of two spur gears in mesh, having two rotational and two translation degrees of freedom, respectively, a diagram exhibiting the system can be seen below. I have derived the equations of motion (EOM) and...
  15. Pouyan

    Matlab Homework: Plotting T vs λ with Max Function and Stylish Design

    Homework Statement I have a function : and I want to draw : Homework Equations where T has values : 600, 800, 1000, 1100 And λ:(0,10*^-5] I have to use max function with two values and the solution must not consist of repeating four times of similar snippets of code, one for each curve.The...
  16. C

    Control Systems - How to find dominant poles *without* MATLAB?

    Homework Statement Design a lag-lead compensator for the system of Figure 9.37 so that the system will operate with 20% overshoot and a twofold reduction in settling time. Further, the compensated system will exhibit a tenfold improvement in steady-state error for a ramp input. Homework...
  17. M

    Linear Algebra: Matlab Question

    I am taking a linear algebra class, and it has a required lab associated with it. Here is the following problem that I must solve using Matlab 1. Homework Statement Write a function using row reduction to find the inverse for any given 2x2 matrix. Name your function your initial + inv(M), the...
  18. F

    MATLAB Matlab map representation problems

    Hi everybody. I am currently doing a metheorological study of Angola's climate. I can draw the country's shape without much trouble. >> worldmap angola >> load coastlines >> plotm(coastlat,coastlon) But once I have the shape drawn things start to go downhill. I have a vector with the...
  19. Eswin Paul T

    MATLAB How to load .mcs files into matlab?

    I am working on Lidar systems and measure the back scattered photons using a Multi Channel Scaler(MCS) The data files are of .mcs format. I need to load these .mcs files into MATLAB. How do I do this in matlab? Is there any function to load these file extensions into matlab? Thanks in advance...
  20. Drakkith

    MATLAB Line Styles in a Graph in MATLAB

    I'm trying to plot 5 periodic functions on the same graph in MATLAB and I can't seem to figure out how to do it correctly. The following code will work, except that I still need to change the line style for each line so that they are easy to tell apart. k = 1; %spring constant w0 =...
  21. I

    System of differential equations in MATlab simulink

    Hello everyone, I would like if someone could help me with a little excersie here. 1. Homework Statement I am trying to simulate a mechanical system from a differential equations in simulink, but I don't know If I am doing it right. I've made the model as you can see in the 2nd picture...
  22. S

    MATLAB Is MATLAB better for numerical simulation

    From cosmology, the tensor to scalar ratio is ##r=16\epsilon## where ##\epsilon=-\frac{\dot H}{H^2}## is the Hubble slow roll parameter. From warm inflation, $$\ddot \phi + (3H+\Gamma)\dot \phi + V_\phi = 0 ,\quad H^2 = \frac{1}{3M_p^2} (\frac{1}{2} \dot \phi^2 + V)$$ where ##H## is the Hubble...
  23. 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...
  24. 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.
  25. 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...
  26. Sirsh

    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...
  27. JasonHathaway

    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...
  28. 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...
  29. 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...
  30. 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...
  31. kelvin490

    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...
  32. 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...
  33. 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...
  34. Captain1024

    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...
  35. 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...
  36. MiloBoots

    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...
  37. 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...
  38. 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
  39. 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...
  40. Euler2718

    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...
  41. Euler2718

    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} =...
  42. 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...
  43. 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...
  44. 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...
  45. 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...
  46. Chandlerw88

    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...
  47. PhysicoRaj

    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...
  48. 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...
  49. kelvin490

    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...
  50. jiaying

    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...
Back
Top