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. M

    Engineering Reconstruct a signal by determining the N Fourier Coefficients

    %My code: %Type of signal: square T = 40; %Period of the signal [s] F=1/T; % fr D = 23; % length of signal(duration) dt=(D/T)*100; N = 50; %Number of coefficientsw0 = 2*pi/T; %signal pulset1= 0:0.002:T; % original signal sampling x1 = square((2*pi*F)*(t1),dt);%initial square signal t2=...
  2. J

    Forward kinematics model using DH parameters in MATLAB

    5 links (thus 6 frames) and corresponding theta, alpha, d and a values are all given. However, I'm not sure how to start coding the DH parameters to derive a forward kinematics model. I know that I'll have to use matrix operators, but do I just put in the values of the 4 factors mentioned above...
  3. A

    MATLAB Bilinear spline interpolation MATLAB using MESHGRID and SURF

    Hello. So, I must provide a solution for an image processing course I am taking (implemented in MATLAB).The task is as follows: 1. I must provide a MATLAB script that takes in a DISCRETE N x N matrix (Greyscale picture) and does Bilinear spline interpolation on it. This is the spline function...
  4. L

    MATLAB Gaussian process and climate model in Matlab

    I'll admit I am very new to Gaussian processes, but from what I know a Gaussian process is completely determined by a mean vector E(Y(θ)) and a covariance function Cov[Y(θ1), Y(θ2)]. E(Y(θ)) is given, and we have the correlation, which is just the covariance divided by Var(θ1)*Var(θ2).The...
  5. whoohm

    Maple Anyone using Maple in 2019 on regular basis?

    I know these software packages were discussed a lot in the past, but I have not seen much input from the last couple years. I have used Matlab for many years, but remember using Maple in University Physics courses many years ago. I'm interested in a software package for symbolic math to use...
  6. Leanne

    How Do You Find the Diameter of a Wire Using Voltage and Length?

    Mentor node: Added code tags From=menu('select:','c', 'g', 'a', 's:'); This is part of my code and I'm not coming up with anything close l=input('input wire length') %current copper=12.5572...
  7. PainterGuy

    MATLAB Replacing the "quad" function with "integral" doesn't work in Matlab

    Hi, I was trying to numerically integrate the following inverse Fourier transform integral,, using the code below. The plot is also shown below. The plot looks good which means the result is good as well. By the way, I was getting a warning which I quote below the code. % file name...
  8. M

    MATLAB Fast Fourier Transform in MATLAB

    Hi PF! I'm following a tutorial in MATLAB, shown here t = 0:.001:.25; x = sin(2*pi*50*t) + sin(2*pi*120*t); y = x + 2*randn(size(t)); Y = fft(y,251); Pyy = Y.*conj(Y)/251; f = 1000/251*(0:127); plot(f,Pyy(1:128)) title('Power spectral density') xlabel('Frequency (Hz)') I read the...
  9. A

    MATLAB Plotting standard deviation in Matlab

    I have a data set 1st coloumn containing ##x## values 2nd coloumn containing ##y## values and 3rd coloumn containing standard deviation of ##y## associated with each ##x## value...I want to plot these 3 values together in a MATLAB plot...can anyone please help me in this regard??
  10. person123

    MATLAB MATLAB API For Wave Flume Data Analysis

    (As a quick note, 'wave flume' should be taken rather generally. I basically just mean the sort of experiments involved in the flow of water which may use instruments such as pressure gauges, load cells, wave gauges, and ADVs. I know that they're not always done in a flume per say -- the...
  11. P

    What specs should I look for in a laptop

    After completing my sophomore year at college as a Physics major and I realized that the laptop I currently have is not able to keep up with the demand I put it under for school. The laptop I currently have has a <2 hour battery life and has been known to crap out (didn't know how else to...
  12. person123

    MATLAB MATLAB Code For Analyzing Experimental Data

    Hi! I'm working on MATLAB code to analyze dat for a specific project, but I'm curious if it could made useful for more general purposes. Here's a bit of background on the project: I'm an REU student and I was assigned to analyze data for a recently conducted experiment. The experiment took...
  13. JJ_Badoo

    I Calculate the exit force of a bullet leaving the barrel

    So, Basic premise is I have 1 input and one output, Energy friom the gunpower burning is input, and the output is the force which pushes the bullet after it is reduced by the friction. m = 12.96 g s = 0.6985 m (barrel lenght) E = 6734 J k = 0.5 (friction coeffcient) I am sorry for lack of...
  14. A

    MATLAB Divergence of a vector field in MATLAB

    If within a volume v ,there exists 10 velocity fields at different points then can anyone please suggest how to compute ##\int_v(\nabla•v)## within the volume?? using matlab For exm if the velocity vector field be ##v=x\hat x+y\hat y+z\hat z## and for x=1 to 10,y=1 to 10 and z= 1 to 10 the 10...
  15. F

    Use a MATLAB Workspace to get the unknown values in an AC circuit

    The plot of part b is attached below. I got a warning on part a , I don't know where is my mistake . Please check my work . Part A clc; clear all; %parta f=800; t=0:10e-6:0.005; xc=10^(-6); xl=40e-3; for i=1:(0.005)/(10e-6) w=2*f*pi; zeq=xl*j*w+50; is(i)=2*(1600*t(i)*pi)...
  16. K

    MATLAB Spring mass impact system in Matlab - How to correct it?

    I am new to Simulink and I wanted to start practicing using a spring mass damper system. My first tutorial was this: Later, I wanted to model a spring system where a mass moving at a known velocity hits the spring. The governing equation and a similar modeling method given in the previous...
  17. F

    Find the real power consumed using MATLAB Simulink

    My work is attached below. I want to confirm my answer. Any help would be greatly appreciated !
  18. M

    Non trivial solution to Schrödinger equation for 1-D infinite well

    Hello, I am trying to find the solution of Schrödinger equation on matlab. However, when I apply boundary conditions, MATLAB only gives me the solution with both coefficients 0. I want to find the solution : Asin(n*pi*x/L) You can see my code below. Could you please tell me where is my mistake...
  19. Eagle9

    MATLAB Book for Matlab to Solve Differential Equations

    Guys I am looking for a textbook about Matlab where In a simple language it will be described how to use this program for solving differential equations. I am more or less aware about calculus but if I have to solve such equations in future – only with this program. So which book could you offer...
  20. R

    I Generating Irrational Ratios in Wave Simulations

    I am trying to write an algorithm that generates two random numbers in a given interval such that their ratio is an irrational number. I understand that all numbers stored on a computer are rational, so it is not possible to have a truly irrational number in a simulation. So, instead I am...
  21. R

    I Re-scaling of exponentially distributed numbers

    For simplicity, let ##N=1##. The following histograms show my results. The generated random numbers are initially exponentially distributed. But after re-scaling they become almost uniformly distributed. What is the cause of that, and is there a solution? P.S. Here is my code in Matlab...
  22. chopnhack

    Creating a vectorized statement in MatLab to output a 5x5 Hilbert matrix

    My first attempt was: V=zeros(5,5) a=1; i=1:5; j=1:5; V(i:j)=a./(i+j-1) I figured to create a 5x5 with zeros and then to return and replace those values with updated values derived from the Hilbert equation as we move through i and j. This failed with an error of : Unable to perform assignment...
  23. cookiemnstr510510

    MATLAB Indexing error in MATLAB coding project

    Hello, I am working on a MATLAB project for my intro to MATLAB course. My project evaluates certain parameters of a spring mass system and graphs the result along with a little mock animation. inputs the user is allowed to change: Initial Position at time =0 Initial Velocity at time=0 Mass of...
  24. D

    Need help with Matlab Function of Differential Equations

    WHAT HAPPENS IS That I need to model the example of A Protein G example, using a function f in Matlab, but when I execute the script, the graphics I get do not correspond to those of the example. The problem is that I can not understand what the model seeks to represent, besides that I do not...
  25. cookiemnstr510510

    MATLAB MATLAB GUI derivative calculator

    Hello! Happy Sunday, I am trying to create a MATLAB GUI that can take an input ( i am starting out with just one variable) and take its derivative and display the result. I have attached pictures of what my GUI looks like, and also the code I wrote so far. Let me also describe my method: I have...
  26. cookiemnstr510510

    MATLAB MATLAB- Creating Symbolic Equation Question

    Hello All! I am finding some inconsistencies with my textbook and MATLAB. I am in the section of symbolic mathematics. I follow the textbook word for word and I am getting some errors. When I am trying to create an entire equation and give it a name like: ideal_gas_law=sym('P*V=n*R*Temp') I get...
  27. Phys pilot

    MATLAB Plot a non homogeneous DPE -- Sum two plots in Matlab?

    Hello, I want to plot this PDE which is non homogeneous: ut=kuxx+cut=kuxx+c u(x,0)=c0(1−cosπx)u(x,0)=c0(1−cosπx) u(0,t)=0u(1,t)=2c0u(0,t)=0u(1,t)=2c0 I have a code that can solve this problem and plot it with those boundary and initial conditions but not with the non homogeneous term...
  28. cookiemnstr510510

    MATLAB logical functions and selection structures

    Hello All, I have a question regarding a MATLAB homework problem. I am learning about logical functions and selection structures. Here is the question: The height of a rocket (in meters) can be represented by the following equation: height=(2.13*t^2)-(0.0013*t^4)+((0.000034*t^(4.751)) create a...
  29. D

    MATLAB Partial Differential Equation - solve with Matlab

    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...
  30. hagopbul

    MATLAB Asking about a command in matlab

    Hello all: I want to ask about the command "javac" in MATLAB ? Any one here knows a useful link on this command other than mathworks ? Any one have some personal experience about this command ? Best H
  31. L

    MATLAB How Can I Retain Image Quality While Showing Axes in MATLAB?

    There is an original image test1.jpg. The problem is to show axes in the image and retain image quality. I am running the following code: img = imread('test1.jpg'); % define variables imgsize1 = size(img,1); % size on screen imgsize2 = size(img,2); xreal = 1; % meter yreal = 1; %...
  32. L

    MATLAB How to transform a plot to use a logarithmic scale?

    I wrote the following code in MATLAB: t = [0:0.001:0.1]; noise = randn(1,size(t,2)); a = 15*10^9; b = 15*10^(-3); c = 7*10^8; y = a*exp(-t/b)+c+noise*100000000; fun = @(p,t)p(1)*exp(-t/p(2))+p(3); p0 = [15.5*10^9, 14*10^(-3), 6*10^8]; p = lsqcurvefit(fun, p0, t, y); t_fit = [0:0.0001:0.1]; y_fit...
  33. hagopbul

    Java Why is this Java code not working?

    Hello all: I am reading a comutacomputa physics book and trying a code from it in MATLAB it is not working and due to my lack of knowledge in this field I can't see where is the mistake hope you can take a look import java.lang .*; public class Motion { static final int n = 100000, j =...
  34. C

    MATLAB_Quantum Well_Finite Difference Method

    Homework Statement Hi, I am new to MATLAB and have an assignment where I have to construct a Hamiltonian matrix, apply boundary conditions, then find corresponding eigenvalues and eigenvectors for the electron in a box problem. I am stumped where to start. From our class we learned that you...
  35. V

    Finding the projection on matlab

    Homework Statement Let u = (3, -8, 5, 5) and v = (-9, -4, -7, 2). Find ||u − projvu||. Homework EquationsThe Attempt at a Solution >> u=[3 -8 5 5] u = 3 -8 5 5 >> v=[-9 -4 -7 2] v = -9 -4 -7 2 >> proj_u_v = dot(u,v)/norm(v)^2*v proj_u_v = 1.2000...
  36. S

    Large datasets - how to handle / alternatives

    Hello, I am trying to do the following: I have two inputs that are very large files - I extract the first column of each so I have two vectors of ~2-5mil by 1. This is timing information. The goal is to extract the indices of each vector where the time in one vector is within a certain...
  37. L

    MATLAB To what extent is the fit to experimental data good?

    I have experimental spectrum in which y-axis is intensity values, and x-axis is frequency values. Int - array of experimental intensities (y-axis). w - array of frequencies (x-axis). I know the view of theoretical function that must describe the obtained spectrum. I explicitly set the function...
  38. V

    Matlab Plotting Points and a Cubic Polynomial that passes through them

    Homework Statement We were given a tutorial to complete which I did complete. Now the question is: By modifying the appropriate lines in your script file, find the values of a, b, c, and d so that the cubic polynomial  y = ax3 + bx2 + cx + d  passes through the (x, y) pairs (-1, 3), (0, 8)...
  39. Abimbola1987

    MATLAB How can attenuation be removed using SCIPY or MATLAB?

    Dear Sirs, I have a signal which has an attenuation of 20dB per decade, how do I remove this attenuation using SCIPY? Alternatively how to do it in MATLAB if there are no SCIPY users here? I'm a SCIPY/MATLAB novice fyg. Thank you for your kind assistance Abim
  40. F

    MATLAB Limiting Map Boundaries in Matlab for Scientists

    Hello everyone. I have generated a world map by plotting coastlat and coastlon. I have done it because I want to plot some data that I have over said map. The problem is that my data goes only from 70N to 40 S and from 45E to 125W, thanks to that, I have a figure which looks like in the adjoint...
  41. majormuss

    MATLAB How do I get Matlab to show the first 10 terms of a series?

    I have attached a picture of what I want Matlab to do. I basically want Matlab to show the list of independent variable 'n' and then another column showing the terms when n=0...10. Some of the outputs are in variable form and others in numerical form. My attempt so far is stated below. I have no...
  42. R

    MATLAB MatLab: Understanding the Size Command

    I have a little bit confusion that how size command work.can body explain please?. For Example A=[1 2 3;4 5 6;7 8 9]; size(A) =3 *3 but size(A,1)=3 and size(A,2)=3 and size(A,3)=1 why is size(A,3)=1?
  43. K

    MATLAB MATLAB - solving equation with Bessel function

    Hello, i am trying to solve this equation for x besselj(0,0.5*x)*bessely(0,4.5*x)-besselj(0,4.5*x)*bessely(0,0.5*x) ==0; I tried vpasolve, but it gave me answer x=0 only. fzero function didnt work, too. What function can solve this equation? Thanks
  44. M

    MATLAB Issue in EMG signal using matlab with arduino

    Hello I'm working on project for "design & implementation of EMG data acquisition" for now I completed the design and connected the output of the system to arduino uno to read the emg signal in real time with MATLAB 2017b using arduino support package. the problem is that the signal looks as...
  45. Baynie

    MATLAB Code: Stationary Schrodinger EQ, E Spec, Eigenvalues

    Hello everyone, For weeks I have been struggling with this quantum mechanics homework involving writing a code to determine the energy spectrum and eigenvalues for the stationary Schrodinger equation for the harmonic oscillator. I can't find any resources anywhere. If anyone could help me get...
  46. K

    MATLAB Matlab plotting and defining range

    how do you define x to be from minus pi to plus pi in matlab? i tried: x = -pi : piBut when i said plot (x,y) Matlab says: "Error using plot Data must be numeric, datetime, duration or an array convertible to double" (i already defined y interms of x, that function is ok) so i culd not...
  47. Atlas3

    MATLAB Need help defining an anonymous function in Matlab

    How can a step function be defined as an anonymous function in Matlab? for example for x ==3 return 1, for all other x return x. Thanks
  48. Atlas3

    MATLAB Matlab function plotting. A continuous step function

    i could use a bit of tutelage with Matlab. I have a rather simple equation I would like to plot. I want to create a rational series of primes divided by their corresponding W value from the equation I have. P are primes 2,3,5,7,11,13... I am still working on this. Thanks
  49. T

    NSGA II and objective function in matlab

    Homework Statement I would like to solve a multiobjective optimization problem with NSGA II using matlab. The code can be found here https://www.mathworks.com/matlabcentral/fileexchange/10429-nsga-ii-a-multi-objective-optimization-algorithm I'm looking for a help to implement my objective...
  50. D

    How to use the window functions on a signal in MATLAB?

    Homework Statement I am suppose to write a program that compares the FFT (Fast Fourier Transform Diagrams) of a sampled signal without the use of a window function and with it. The window function should be as long as the signal and the signal should have N points, N chosen as to not cause...
Back
Top