What is Matlab: Definition and 1000 Discussions

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

    I How to turn model of Schrödinger's Equation 2D?

    Hi, I am a student in the Netherlands, currently 17 years old and at the end of my 'middelbare school', meaning that next year I'll be a bachelor student at a university. I am doing an extended essay/research thing that is custom you do in your last year, with a friend of mine. We picked the...
  2. E

    MATLAB What is wrong with this WHILE loop?

    Here is my code: while a ~= 3 || b <= 1; a = a - 1; (other expressions); end; For this code, the 'while' loop should stop when 'a' reaches 3, however it does not, even though 'a' starts with a higher value than 3. The 'other expressions' part are calculations that manipulate 'b', the only...
  3. B

    Problems with Matlab code for simulating spring motion

    The issue I am having is setting up the actual program for the problem. I am having trouble interpreting the code and, because of that, having issues getting it to work properly. The whole thing was written with Matlab and the goal was to write a function that could simulate the motion of a...
  4. J

    MATLAB Solving Orbital Motion Equations with RK4 Using MATLAB

    I'm trying to plot the solutions of the second order differential equation d^2R/dt^2 = GM/R^2 + Lz^2/R^3. I'm reducing this to a system of first order ODEs and then using RK4 to solve this system. My code is given by function RK4system() Tsim = 10...
  5. M

    MATLAB Discovering MATLAB: Tips for Learning from Scratch

    Hello everyone, For those of you who are familiar with MATLAB and have worked with it in the past, I would like to hear from you guys about efficient and good ways to learn it from scratch. I would appreciate it if you can also specify websites, books, online courses or whatever it is that you...
  6. X

    Designing butterworth filter of Nth order

    I want to design a digital butterworth lowpass filter of nth order, with only freedom of choice to user being order of the filter and the cut off frequency, i already have a 1st order low pass. Code: T = 1/(2*pi*this.fc); this.A = -1/T; this.B = 1/T; this.C =...
  7. J

    Matrix riccati differential equation using matlab

    Homework Statement Homework EquationsThe Attempt at a Solution
  8. pairofstrings

    MATLAB IDE with support for MATLAB and Circuit Simulators

    Hello. I am using Linux platform to do Embedded System Programming. I want to know the name of Integrated Development Environment software that runs on Linux or Windows (via Wine on Linux) and that has support for MATLAB and any circuit simulation software. Also, please let me know a good...
  9. Guidestone

    MATLAB Matlab deployment Error because of folder permissions

    Hey guys, so I wanted to give Matlab a shot regarding programming standalone applications but I keep getting the same error whenever I use "deploytool" in the command prompt. The error message picture is attached to this message. According to the error message I must change my MATLAB current...
  10. A

    MATLAB Calculating Total Eigenvalues in Matlab

    Hi. How do you calculate Total eigenvalues smaller than a certain value in Matlab?
  11. A

    MATLAB How to Calculate the Second Derivative of a Curve in Matlab?

    I have a set of data as follows, How can I calculate the second derivative of the curve obtained from these data. x=[0.1;0.07;0.05;0.03;0]; r=[-98.9407;-105.7183;-111.2423;-116.0320;-120.0462];
  12. I

    MATLAB Transforming part of matlab code to Fortran90

    Here are my Fortran codes: program test implicitnone integer*4 nxProjPad, cf, numViews, cc, index, indRad, iv, i, INDEX1, d, n real*4 v4, v5, RSS, S1, F1, gMDL real*4, dimension(:), allocatable :: array, sum, cumsum, transpose, log, SS1, SSs nxProjPad=185 numViews=180...
  13. Woa90210

    What was most helpful understanding Signals and Systems?

    Hey guys! This is my first day on the forum so, hey! I'm a third year electrical engineering student and I'm really having some trouble with Signals and Systems so I want to know what helped other people understand it so that maybe I could try some of their methods. What were your biggest...
  14. kelvin490

    MATLAB How can I append new columns to an existing Excel file with MATLAB?

    I would like to ask how to use MATLAB to append new columns into existing excel file without altering the original data in the file? In my case I don't know the original number of columns and rows in the file and it is inefficient to open the files one by one and check in practice. Another...
  15. F

    MATLAB 3DES or RSA implementation for optics in MATLAB

    Can encryption algorithms like 3DES or RSA be implemented for optical networks in MATLAB? I know that the implementation of these in optics have been studied. But I am not sure what software they would have used. Can I use MATLAB for the same? Any resource on how to do this would be greatly...
  16. MAKK

    MATLAB [Convert Matlab code into C++]

    anyone help me to convert this sample code of Gaussian Cone shape of random number code in Matlab into C++ function GaussianCone clear all; clc; mx=10000; my=mx; mz=mx; z=[1:1:mz]'; sigma=0.01; R=0.5; mu=0; sigmax=sigma+R*z; sigmay=sigma+R*z; x=zeros(mx,1)...
  17. R

    MATLAB Interpolating a zoomed in colorscale image in Matlab

    I have no idea what I am doing wrong. I have already found multiple places on the internet which give clear examples of how to do this, yet I am still struggling. Please help me out, or at least point me somewhere. My code is below. I am trying to interpolate pixels of a full color image. The...
  18. jdawg

    Matlab: Problem with function inputs

    Homework Statement The volume V of a liquid in a partially filled ellipsoid shaped tank is given by V = (pi/3)*(3*a-h)*(((b^2)*(h^2))/(a^2)) Develop an M-file to create a plot of volume versus depth. Here are the first few lines: function myellipsoid(a,b,plot_title) % Volume of horizontal...
  19. M

    MATLAB Number formats in Matlab [not to use e symbol]

    When I write 1.516*10^-5 in Matlab it gives 1.516000000000000e-05 but I do not want to use e symbol. So which format should I use. I could use format bank but it has only two digits. I need more digits. Would you like to help me. Thank you.
  20. M

    MATLAB Greek symbols on Matlab workspace

    Can we use Greek symbols on Matlab workspace? If so, how can we use them? I have made a search, most of the replies on the net was that Greek symbols cannot be used on workspace. Thank you.
  21. M

    MATLAB Too little appearance of symbols and numbers in matlab

    Hi, When I using Matlab 2008, the symbols and numbers were big enough to see but now I use Matlab 2013 but symbols and numbers or what I write is too little. How can I make them bigger? Thank you.
  22. L

    MATLAB How can I use MATLAB to take the derivative of an experimental plot?

    In MATLAB, what does ./ mean? Also, I would like to take the derivative of an experimental plot. How do I do so?
  23. jdawg

    Help with Plotting Data & Function in Matlab

    Homework Statement I'm a little lost on how to plot this data and function. I included the homework question and my attempt at plotting in the attached picture. I'm pretty sure what I have is completely wrong and I honestly don't have much of an understanding of matlab, so the more you dumb it...
  24. sounouhid

    MATLAB Fit Experimental Data with MATLAB: Best Practices

    Hello everyone help please I need to fit experimental data with a theoretical model using the MATLAB software what is the best way to do it? thx for advance
  25. srinaath

    Generating SPWM using arduino-simulink environment

    hi all...am trying to generate sinusoidal pulse width modulation using arduino-simulink for my inverter board...I simulated the SPWM logic in simulink, then installed the required support package for arduino-simulink...but i am facing some problems...I started from basic...like linking arduino...
  26. JesseJC

    Matlab Extrapolation: Find Approximate Size of Matrix n∗

    Let A be a random n×n matrix, x = (1,1,...,1)⊤ be an n-vector of ones and b = Ax be the right-hand side vector. As in class, let z = (zj) ∈ Rn be the result of solving the system Ax = b in finite precision using the backslash command. To measure the error between x and z, we let δ= max |xj−zj|...
  27. A

    MATLAB Crank-Nicholson in 2D with MATLAB

    I have the code which solves the Sel'kov reaction-diffusion in MATLAB with a Crank-Nicholson scheme. I would love to modify or write a 2D Crank-Nicolson scheme which solves the equations: ##u_t = D_u(u_{xx}+u_{yy})-u+a*v+u^2*v## ##v_y = D_v(v_{xx}+v_{yy}) +b-av-u^2v## Where ##D_u, D_v## are...
  28. F

    MATLAB Finite difference numerical integration or ode45?

    I'm trying to numerically solve the time dependent Schrödinger equation and I've been told that the best approach is to numerically integrate using a finite difference method, however I don't understand why I couldn't just use ode45 to solve it?! Is the finite difference (interpolation) method...
  29. C

    Nuclear Reactor Simple 1D Method of Characteristics Solver

    Homework Statement Hi all, attempting to make a Method of Characteristics solver in Matlab. I'm particularly hoping that there are some computational nuclear engineering guys about who might have a bit of experience programming a simple version of one of these. I'm trying to create the solver...
  30. kelvin490

    MATLAB How to set zero value boxes transparent in 3D plots?

    I used a function called ind2patch to make a big 3D block which contains a number of smaller blocks in 3 dimensions. Each small block has a value which the magnitude is represented by a color.One example is shown below: However, most of the boxes have very low or zero value and I don't need to...
  31. C

    MATLAB Numerical Integration with Matlab - Solve K33, K11 Integral

    Hi all, i need help solving the following integral using Matlab: * tetam is a parameter and the integration is by alpha. the answer should be function of tetam * K33, K11 are constantsThanks , Chen
  32. Nemo's

    Fourier series neither odd nor even

    Homework Statement I'm trying to calculate the Fourier Series for a periodic signal defined as: y = x 0<x<2Π y = 0 2Π≤x<3Π Homework Equations Fn = 1/T ∫T f(t)cos(kwοt + θk)[/B] cn/2 + ∑k=1k=∞(cn)cos(kwοt+θk) cn= 2|Fn| θk=∠Fn The Attempt at a Solution I got Cn =...
  33. H

    MATLAB MATLAB: Plot Contour at 0km Depth

    I'm trying to generate contours that plot with the animation using contour(X,Y) but it's not quite working. I only need it to be in the x-y plane at 0km depth (see picture for greater clarification) % A script to plot two 3D waves. clear %Define the total time for simulation T_total=10; %Set...
  34. E

    Mathematica Numerical vs. Monte-Carlo Simulations

    I have an integration that doesn't have a solution in the table of integrals. So, I evaluated it using Mathematica using the command NIntegrate. However, when I compare the result with Monte-Carlo simulations, there is a very small constant gap between the two curves. Is it because of the...
  35. Molay Mahdi

    MATLAB How to visualize 3D solution on matlab?

    I just want to know how to visulize 3D solution in MATLAB by different ways So please I need some help.
  36. R

    MATLAB Fix Filtering Frequencies Code in Matlab w/o Built-In Filters

    I want to write a Matlab code which removes all frequency components from a .wav sound file except those within ##±25 Hz## of ##523 Hz## as well as its harmonics (up to the Nyquist frequency). I want to do this without using any built in filters. Here is my code so far: [s, Fs] =...
  37. A

    Implementing double series in MATLAB

    Mod note: Moved from a technical forum section, so missing the homework template I want to write code for this double sum in MATLAB and I have written following code: x = 100; % to calculate omega and u l = 300; % to calculate omega p = 10; omegaa= x/l; deltaH = 200; deltat =...
  38. NayKod

    MATLAB Matlab Trial Version: Test Simulation for PhD

    Hello Everybody, I'm new to this interesting forum and this is my first post :) So i wonder if can i use a Trial version of Matlab to perform some simulation for my Phd. Is the Trial version allow doing some important tests ? Thank you for your answer
  39. rolotomassi

    MATLAB Why am I getting a 'Matrix is singular to working precision' error in Matlab?

    Here is a link the code which I am trying to modify. It is the radial average of a matrix function. http://uk.mathworks.com/matlabcentral/fileexchange/46468-radialavg-zip/content/radialavg.m I want to restrict the function to only look within certain angles, e.g. 15 degrees either side of the...
  40. C

    MATLAB How to use matlab for imaging?

    Hi, I am a novice at MATLAB and just started using it. I need some help with it. I want to post process an array of time domain signals using a specific algorithm. These time domain signals are acquired using labview and I want to post process them using matlab. I have the equation for post...
  41. rolotomassi

    MATLAB How can I smooth pixelated images in MATLAB?

    Hi. I have this code in matlab: / / I=dlmread('C:\Users\rshah\Desktop\Polymer Project\monteCarloCode\E=1e8.txt'); F=fft2(I); F = fftshift(F); % Center FFT F = abs(F); % Get the magnitude since F is complex F = log(F+1); % Use log, for perceptual scaling, and +1 since log(0) is undefined...
  42. S

    Solve question using Excel or Matlab

    water moves over a stationary horizontal flat plate of one-meter length. if velocity of water is 1 m/s, draw boundary layer and friction coefficient versus x for this plate. hint: start your curves from x=1cm.Professor asked us to do it in Matlab or Excel and I'm not sure I understand how to...
  43. R

    Identifying Fundamental Frequencies

    Homework Statement I have made a plot of a given .wav file in Matlab. The problem asks: find the fundamental frequencies of the 3 vibrating strings, and identify some of their harmonics. Homework Equations 3. The Attempt at a Solution [/B] So I made a Matlab plot of the power spectrum over...
  44. DiracPool

    MATLAB How compatible is Freemat with Matlab?

    In post #5 of this thread, Jedishrfu commented that Freemat is a cheap and free alternative to Matlab. My question is how close an alternative is it. I need to learn python and MATLAB for my upcoming entry into a grad program this fall. Python is free, of course, but should I buy the actual...
  45. R

    MATLAB Bisection method and numerical integration

    In Matlab I am trying to use the composite Simpson's rule to find ##x_l## so that $$170=\int^{x_l}_0 \sqrt{1+(y')^2} dx = \int^{x_l}_0 \sqrt{1+\left( \frac{x^2}{68000} \right)^2} dx $$ For convenience this can be written as $$I(x) = 170 - \int^x_0 \sqrt{1 + (\frac{x^2}{68000})} dx$$ The...
  46. Ben Wilson

    MATLAB Replace NaN with next element in Multidimensional Array

    I have a a multidimensional array (49x49x49) which has NaN values scattered randomly. For each NaN, I want to replace the value with the previous non NaN value. e.g. if i had a 3 x 3 matrix 4 7 9 2 7 NaN 1 2 NaN should become 4 7 9 2 7 7 1 2 2 I have 3 dimensions [i,j,k], but...
  47. R

    MATLAB How can I fix the dimensions mismatch in my split-step Fourier method code?

    I am trying to write a very basic Matlab code to preform the split-step Fourier method on the nonlinear Schrodinger equation: $$\frac{\partial A(z,T)}{\partial z} = -i \frac{\beta_2}{2} \frac{\partial^2A}{\partial T^2} + i \gamma |A|^2 A \ \ (1)$$ I want the program to make 3D plots of...
  48. Ben Wilson

    MATLAB Plot 3D Function: Point Where f=1, No Point Where f=0

    I had a function of 3 variables f'(kx,ky,kz) and did an ifft f = ifft(f') and now i have a function where inside a small polygon the function f = 1, and outside f=0, within a cube space of length L. how do i plot a scatter graph for this function where there is a point when f =1, and no...
  49. SimOpera

    MATLAB Pdepe solver for diffusion equation in a packed column

    Consider I have a packed column of length L filled with known characteristic adsorbent. I am putting a mixture of N components in it and I am solving for concentration of each component in mobile phase at the outlet of the column. The equations which are to be generalised are as follows: An...
  50. Ben Wilson

    MATLAB Matlab syntax for 2-d fourier transform

    I have a function f(x,y) which i have defined in this way: a vector x and a vector y meshgrid[x,y] z= f(meshgrid[x,y]). how do i do a 2-d Fourier transform of f(x,y)? the transform must be done without using operations like fft, and must be done using summations written in the code.
Back
Top