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

    Exporting a matrix to Microsoft Access: Error using database/

    Hello! Below is the code for the following task: matrix "Q" with a dimension of 3*2 was obtained using a matrix of cells "A"; then the matrix "Q" is exported to Microsoft Access with the same dimension (3 rows, 2 columns). (!) The difficulty is that only the first row of the matrix is written...
  2. ytht100

    MATLAB LMI in Matlab scaling to improve condition number?

    A=[ 8147 6324 9575 9572 9058 0975 9649 4854 1270 2785 1576 8003 9134 5469 9706 1419]; D=diag([T^(-3)*L^2 T^(-3)*L^2 T^(-1)*L T^0*L^0]); I have matrix A whose first two columns are of the units T^3/L^2, third columns unit is T/L, and the last...
  3. T

    MATLAB High pass filtering FFT2 matlab

    I am having a slight issue with my code and honestly cannot understand what I am doing wrong. I am currently trying to using a high pass filter in the frequency domain to form the following image. So my approach so far after numerous of attempts which I won't list as I believe I am on the...
  4. L

    MATLAB Can I know the reconstruction of phase shift interferometry in Matlab

    I want to know the reconstruction of phase shift interferometry by angular spectrum method in matlab
  5. N

    Gas pressure regulator model in Simscape

    Hello, I want to develop a pressure regulator model in simscape. The model will be the springloaded direct acting system and the aim is to target outlet pressure, temperature and flow rate by giving input parameters as pressure, temperature, spring stiffness, length and preload, lever(it is...
  6. R

    Plotting Free Body Diagram for Scalar Triple Product in MATLAB

    Homework Statement [/B] The scalar triple product computes the magnitude of the moment of a force vector about a specified line. It is M = ( r×F ) ⋅n , where is the position vector from the line to the point of application of the force and is a unit vector in the direction of the line. Prompt...
  7. J

    Modify Fibonacci Function to Return nth Number - Matlab Homework

    Homework Statement Modify the function so that instead of returning all n numbers, it only returns the nth number. Homework EquationsThe Attempt at a Solution I'm not sure how to return only the nth number of the fibonacci sequence. Please help.
  8. T

    MATLAB Numerical approximation of the area under curve

    I am very new too Matlab and how it all works but I am having trouble understanding at what axis the numerical integration is occurring from on the graph that I plotted. So I am currently doing an experiment in gamma ray spectroscopy and due to issue with the software we found it hard to...
  9. M

    MATLAB Solving Chromatography PDE with MOL and ode15s

    Hello all I am using the method of lines to solve the following PDE: ## \frac {\partial C} {\partial t} + F\frac {\partial q} {\partial t} + u \frac {dC} {dz} = D_{ax} \frac{\partial^2 C} {\partial z^2} ## ## \frac {\partial q} {\partial t} = k (q^{*}-q) ## With these initial conditions: ##...
  10. ItsTheSebbe

    Finding the bandwidth of a parallel RLC circuit (+MATLAB)

    Homework Statement The attempt at a solution Constructing the total impedance of the circuit as follows, $$\frac{1}{Z_T}=\frac{1}{Z_R}+\frac{1}{Z_C}+\frac{1}{Z_L}$$ where $Z_R=R$, $Z_C=-j\frac{1}{\omega C}$ and $Z_L=j\omega L$. $$\frac{1}{Z_T}=\frac{1}{R}+j\omega C+\frac{1}{j\omega L}$$...
  11. dRic2

    MATLAB Compare MatLab vs Mathematica for CFD | Ric

    I know a little bit of MatLab (for example I can solve simple, well conditioned, systems of 1st and 2nd order ODE), but I know nothing about Mathematica. I don't know whether or not start to learn how to code in Mathematica or keep studying MatLab. For example, for CFD (computational fluid...
  12. yecko

    (Matlab) beam deflection solution using symbolic simultaneous equations

    I have tried to searched for functions online and apply it, but still it does not work well. May I ask how can I solve symbolic simultaneous equations with Matlab? Or is there anything went wrong with my program? Homework Statement Consider a stepped beam shown in below. The beam is...
  13. Wrichik Basu

    MATLAB Matlab toolboxes essential for every physicist

    I was looking forward to buy Matlab student license sometime this year. Anyone who has already bought a license knows that a number of toolboxes are available. Here is the site. I am not buying Simulink at this moment. So, please leave out anything related to Simulink. Other than the basic...
  14. N

    Inertia tensor of cone around its apex

    Im trying to calculate the principals moments of inertia (Ixx Iyy Izz) for the inertia tensor by triple integration using cylindrical coordinates in MATLAB. % Symbolic variables syms r z theta R h M; % R (Radius) h(height) M(Mass) % Ixx unox = int((z^2+(r*sin(theta))^2)*r,z,r,h); % First...
  15. R

    MATLAB Finite Element Analysis (FEA) in MATLAB - Textbook Guide

    Does anyone know of a great text that shows how to set up FEA in MATLAB in detail. I have wrote out the sort of pre pseudo code from John Andersons - Computational Fluid Dynamics now I just need to build it out in code. I am old school with the hand sketches, hopefully this does not get me a...
  16. M

    MATLAB Switched from win10 and MATLAB to ubuntu and python"q"

    Hi, I felt like I have to learn more than one coding language, and wanted to strengthen my coding skills in general. I am good with Relap5 but I want to learn OpenFoam. is what I did logical and going to be worth the pain ? also I only have the Relap5 version of a windows ,is it possible to run...
  17. S

    Dealing with 1000 digit numbers

    Hi, Mostly i work with Octave / Matlab but i am trying to get into python also. Lately i have a couple problems where my numbers can't be represented in binary64 or float64 default format because they exceed the max of 1.8x10^308. Is there a common way people deal with this (without toolkits)...
  18. R

    MATLAB Finite element skeleton code for matlab

    Hello, Does anyone know if a finite element skeleton source code exists. Finite element can be used for structural memebers, gas dynamics, etc. But the over all stepping software is the same and then just input the core equations. My application is for pseudo one dimensional compressible...
  19. S

    Simulink bloc of PMSM (permanent magnet synchronous motor) parameters

    greetings. I designed a system on simulink. it is missing a pmsm. I found a block on simpowersystems in simulink nde matlab. I hope that this engine provides a nominal power of 96kw and maximum of 100kw. so how to test it? to verify that this engine can deliver these two powers? cordially. said.
  20. A

    Converting impedence response to electrical conductivity

    Hi, I have a curve, impedance magnitude vs frequency. i would like to convert this curve to electrical conductivity vs time. how can i do that?
  21. jamalkoiyess

    MATLAB Hardware advice for a MATLAB oriented PC build

    Hello PF, I am considering some options in my upcoming PC build and want to choose the one that performed best in MATLAB. What I mostly do is velocimetry with a big amount of points, image processing, statistical analysis. My options are between 2 CPUs: AMD Ryzen 2700 - for the 8 physical...
  22. E

    MATLAB Evaluating Nested Integral in MATLAB for General K

    Hello, How can I evaluate the following nested integral in MATLAB for a general value of ##K## {\int\limits_{u_1=0}^{\gamma}\int\limits_{u_2=0}^{\gamma-U_1}\cdots \int\limits_{u_{K}=0}^{\gamma-\sum_{k=1}^{K-1}U_k}}f_{U_1}(u_1)f_{U_2}(u_2)\cdots f_{U_{K}}(u_{K})\,du_1du_2\cdots du_{K} where...
  23. F

    MATLAB Translating from Mathematica to Matlab

    Hello everyone. I was wondering if someone could tell me how to write the next line of Mathematica code in Matlab. x = Sum [ Sqrt [ vals[ [ j ] ] ] * vecs [ [ j, All ] ] * z [ [ j ] ] , {j,1,10} vals is a eigenvalues vector, vecs is a eigenvector matrix and z is a vector of random variables...
  24. T

    MATLAB Convert R Code to MATLAB for Detrended Cross Correlation Analysis

    Homework Statement I would like to convert this R code into matlab. This code perform a calculation of beta coefficient based on Detrended cross correlation analysis. Homework Equations require(tseries) require(fracdiff) require(matrixStats)DCCA_beta_avg<-function(y,x,smin,smax,step){...
  25. dRic2

    MATLAB What Does the Final Equation Represent in a Chemical Distillation Column?

    Here's what I have to do: 1) I arbitrary give a first value to the variable ##x_b##. Let's say ##x^{(0)}_b = 0.3## 2) I find ##x_D## by evaluating this integral: $$ln(\frac {52.32} {100}) = \int_{0.5}^{x^{(0)}_b} \frac {dx} {x^{(0)}_D - x}$$ 3) I use the value I got for ## x^{(0)}_D## to...
  26. T

    Natural frequency in stationary and rotating frames....

    Hi, I am trying to gain insight into using stationary vs. rotating coordinate frames for natural frequency calculations. I have seen many FE codes suggest that critical frequencies can be calculated differently in rotating and inertial frames, so i wanted to do a 1D calc to see for myself how...
  27. T

    Solving a set of nonlinear quadratic equations

    I would like to solve this system, which is a sets of non linear quadratic equations, the system needed to be solved can be expressed in general as follow: ϒϒ'C – ϒα = B Where ϒ=(ϒ1,ϒ2,...ϒn)’ is a column vector and ϒ’ its transpose C=(c1,c2,…,cn)’ and B=(b1,b2,…bn)’ are a columns vector And...
  28. C

    MATLAB FFT problem for Fresnel simulation

    Hi all, I'm trying to simulate the Fresnel diffraction by using this expersion : $$ A(x')=\frac{1}{j\lambda z}e^{jk(z+\frac{x'^2}{2z})}F(A^{trans}(x)e^{jk\frac{x^2}{2z}})_{u=\frac{x'}{\lambda z}} $$ So when I use this formula my problem is that I don't know how to take the good frequency, here...
  29. T

    MATLAB Binary bitstream from QPSK with MATLAB?

    Hi , I am trying to extract the binary bitstream from QPSK using MATLAB. Will something like Frames = reshape(B,[],N) work? If not, can someone point me in another direction?
  30. D

    Problem with plotting a function in MATLAB

    Homework Statement Write code for solving the integral ##\int_{0}^{x}e^{-t^2}dx## using simpsons method and then plot the function from ##x = 0## to ##x = 5## with ##0.1## increment. Homework Equations 3. The Attempt at a Solution [/B] I was told that the best way to plot the function is to...
  31. C

    MATLAB Karhunen Loeve Expansion in Matlab

    Hello everyone. I am trying to generate the KL expansion of a stochastic process. I use a Monte Carlo sampling method to generate the process, which involves two random variables and I compare it with it's theoretical mean for 50 values of time and they look quite similar. Then, I calculate the...
  32. lc99

    MATLAB MATLAB: forces acting on an object

    i have a assignment for my MATLAB (first year) class, and I am slightly confused om what exactly i should be coding. im not struggling with the coding part, but what i am suppose to code. im used to coding based on what it is needed. So, for my project, I am suppose to represent the forces...
  33. C

    Calculating Projectile Distance with MATLAB: Physics Homework Help

    Homework Statement I have to write a MATLAB script that calculates the horizontal distance of a projectile fired from a cannon set at 45 degrees by a compressed spring. I know that the spring constant is 6 lb/in, the unstretched length of the spring is 1 foot, the mass of the projectile is 0.1...
  34. quasarLie

    MATLAB Creating a Histogram with Data from a File.dat in MATLAB

    Hello everyone, I'm trying to make a MATLAB program which read a file.dat and then do a histogram This what I did Data2=importdata('Ma.DAT'); R1=Data2.data(:,17) R1(R1>-9.9) L = 0:0.1:8; histc(R1,L) bar(L,histc(R1,L),'histc') xlabel('R1') ylabel('counts') I want to eliminate all the number...
  35. Eswin Paul T

    MATLAB Sovling Bernoulli's differential equation in matlab?

    I have a first order bernoullis differential equation. I need to solve this in matlab. Can anyone help me?
  36. quasarLie

    MATLAB How to Plot Data into Bins in MATLAB

    Hello, I am writing a program in MATLAB that reads a file.dat, I also want to draw by bin of z and degraded the color for example for z between 0 and 1 put the color red, for z between 1 and 2 put blue. But I do not know how to do it Here is my code Data2=importdata('fichier.dat')...
  37. M

    MATLAB Exporting Multiple Variables from Mathematica to MATLAB - Quick and Easy Guide

    Hi PF! I'm trying to export two matrices ##A## and ##B## from Mathematica into MATLAB. I can export one just fine; so far what I write is SetDirectory[NotebookDirectory[]] Export["data.mat", {A}] Do you know how I can export two variables at a time and then how I can export directly into...
  38. C

    MATLAB Coding angular spectrum of waves in a fluid

    Hi, I am trying to code ultrasonic transducer radiation in water using angular spectrum of plane waves. I am having difficulties in the sampling and fft. If anybody has an idea about this can you please help me out? I can paste the code once i get some response. Thanks for your help!
  39. Bloopy

    MATLAB: Verification of Superposition Principle

    Homework Statement Verify Superposition Principle using Matlab, given a DC source of 100V, an AC source of 50V, 60Hz and three resistances, R1=10 ohms, R2=20 ohms and R3=15 ohms. I created the circuit below and ran the program. Result: Homework Equations None, just running the program...
  40. Nikhil N

    MATLAB How can I run Python by getting values from Matlab

    I have a python script for which the input data are coming from Matlab. I have tried to use pymatlab, but it is failing. Can anyone suggest any other method?
  41. grandpa2390

    MatLab Code for Baseball Not Working

    Homework Statement I am trying to create this plot in MatLab I'm starting out doing the simplest one, no drag, no wind. simple kinematics, right? but I can not get my code to run. Homework Equations Kinematic Equations The Attempt at a Solution close all clear all clc %%defining variables...
  42. grandpa2390

    Why Won't My Matlab Code Work?

    Homework Statement I need to write a program in Matlab that accomplishes this graph: I keep getting an error on Line31 Column 161 about unexpected parenthesis. They look balanced to me. If I take one away from either side, I get an error that I am short a parenthesis. I also need to change...
  43. C

    MATLAB How can I create a matrix with two columns in Matlab using a modular operation?

    Hello everyone. I am trying to create a matrix in Matlab with two columns which should look like as follow: 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9... 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1... Has anyone programed something like this before?
  44. SemM

    MATLAB Making a short test for self-adjointness

    Hi, I made the following command in MATLAB to test for the following: \begin{equation} \langle T\psi,\phi\rangle=\langle \psi, T\phi\rangle \end{equation} %Self-adjoint test syms x a = (diff(exp(-x^2)))*exp(-2*x^2) b = (diff(exp(-2*x^2)))*exp(-x^2) W = int(a, x) P = int(b, x) O=W-P and it is...
  45. grandpa2390

    MATLAB What is each step of this Matlab program doing?

    So here is the program. I've spent a few hour trying to follow it. I numbered each line and after the code will try to explain what I think is going on in each line. I'm completely new to Matlab, and programming is a great weakness to me. I need help. 01. nuclei=zeros(1,100); 02. t=nuclei...
  46. M

    MATLAB Suggestions for a non-linear fit model in Matlab

    Good afternoon, I have a problem which I haven't solved yet, regarding a non-linear fit to a set of experimental data. I tried to solve it in Matlab, which I handle a little bit. I have a sensor, which has been designed to have 4 different filters in front of it. By making a sweep with the...
  47. R

    MATLAB Fraunhofer diffraction simulation in Matlab

    Hello, below is the screenshot from the book INTRODUCTION TO MODERN DIGITAL HOLOGRAPHY With MATLAB (TING-CHUNG POON, JUNG-PING LIU). This book is free to download. There is a script for Fraunhofer diffraction pattern and equation 1.40 is Fraunhofer diffraction formula in terms of Fourier...
  48. Nikhil N

    Dynamic modeling of a system and transients of the system

    Consider, I have a dynamic system model for air compressor. Which means I have modeled the system by including its physics. Does this means I also included the transients of the system? What I think is, when i modeled any system with equations, I think that includes the transients. Is it...
  49. grandpa2390

    How do I translate this program to matlab?

    Homework Statement Homework EquationsThe Attempt at a Solution I'm taking Computational Physics. And I am trying to learn how to program in matlab. But I don't understand the author's code and what it is in MATLAB code. Can someone help me?
  50. L

    MATLAB Plotting Coordinate Transformations in Matlab

    I was reading this article (https://www.nature.com/articles/srep40083) about designing a panoramic lens with transformation optics, and wanted to try to play around with modifying the coordinate transformations. I contacted one of the authors of the article, and she mentioned that she plotted...
Back
Top