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

    MATLAB A simple symbolic expression in Matlab

    I tried to check x²-1 = (x+1)(x--1) So I did the following: Matlab returns 0. Any suggestions? :) (Matlab beginner by the way)
  2. B

    How to Compute Convolution Using FFT in Matlab?

    Homework Statement You have two functions in Matlab (represented as column vectors). Compute their convolution using the fast Fourier transform. Homework Equations The Attempt at a Solution I am having trouble finding a book with this topic. I would like to know where the...
  3. M

    MATLAB Geographical points + great circle = ellipse? (Matlab)

    I'm doing this in Matlab but it's not restricted to any particular software. I have a bunch of geographical points (x,y coordinates for each) and I want to take all the points that are 50 km or closer to the reference point. I took the great-circle equation to convert geographical longitude...
  4. I

    MATLAB How Can You Handle Unassigned Outputs in Simulink's Embedded MATLAB Function?

    Hello everyone! In Simulink , I use the Embedded MATLAB Function function out = fcn(meas) if meas>10 out = 4; elseif meas<=0 out=2; end And I get this message: Output argument 'out' is not assigned on some execution paths. I would like the variable 'out' to change its...
  5. B

    MATLAB Fixing Matlab GUI Resize Problem: Repositioning and Full Screen Issues

    I have been trying the following to reposition my GUI (within the OpeningFcn): h=get(handles.figure1,'Position'); set(0,'Units','normalized') S = get(0,'screensize'); width = h(3); height=h(4); x = (S(3) - width)/2; y = (S(4) - height)/2...
  6. B

    MATLAB What could be causing unexpected positioning of a GUI in Matlab?

    I have been trying the following to reposition my GUI (within the OpeningFcn): h=get(handles.figure1,'Position'); set(0,'Units','normalized') S = get(0,'screensize'); width = h(3); height=h(4); x = (S(3) - width)/2; y = (S(4) - height)/2...
  7. M

    MATLAB, single command for multiple columns

    Homework Statement Create the following matrix by typing one command. Do not type individual elements explicitly. \begin{array}{ccc} 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 4 & 7 \\ 0 & 0 & 2 & 5 & 8 \\ 0 & 0 & 3 & 6 & 9 \\ \end{array} Homework Equations None The Attempt at a...
  8. L

    Matlab - What does an array definition mean

    I'm trying to make a MATLAB plot with two types of data, i.e. temperature and air flow rate. Since the temperature and air flow rate are on different scales I wanted two y-scales and since there are quite some data sets, I wanted to make the two air flow rates bold. I tried this, but it doesn't...
  9. E

    MATLAB How to do Abel inversion using Matlab

    hi,everyone. How to do Abel inversion using Matlab? what is the algorithm? I read something in wiki,but I have no idea how to perform it! anything helpful would be highly appreciated.
  10. ElijahRockers

    MATLAB - Autocorrelation Project

    I'm trying to design a program that can accurately detect the frequency of a real, periodic audio signal, such as several guitar notes in sequence. I have the skeleton of the program working. It does, at times, accurately detect the frequency. However, it is very noisy, and I'm not too sure how...
  11. M

    MATLAB Matlab fails to access a list of variables

    So I have a list of variables, defined in my workspace, and I'm trying to access them each in turn to compare them to a larger matrix A. The eval function calls each variable in turn, stores it under temporary matrix B, then compares it to matrix A, does the necessary calculation, and stores it...
  12. Q

    MATLAB Fit data with function in MATLAB

    Dear users I have some points with coordinate x and y forexample : x=[1 2 3 4] and y=[2 4 6 8] and then I want to fit these 4 pair of points with some function for example y=a*x+b (here I know that the answer is a=2 and b=0) what should I...
  13. E

    MATLAB How can I optimize my MATLAB program to reduce processing time?

    Hello, I have a MATLAB code that contains a lot of for loops, and hence it is very slow, and takes hours and hours to get just initial results, which is very inefficient. I know writing the program in terms of vectors will fasten the process, however, I do not know how to write my program...
  14. G

    MATLAB code for generating PPM :

    Hi all, I am quite new to MATLAB . I would like some help on the following: generation of Pulse Position Modulation using a MATLAB code. thank you :)
  15. jeffer vitola

    MATLAB Mistakes in Matlab, Wolfram, Derive and Ti Nspire

    hello remember not speak English and use a translator on line, together some pictures to show some errors,from a simple integral or easy to those who are not as oscillatory integrals, when I worked and ask oscillatory integrals or approximate numerical answers, also when try plot a complex...
  16. V

    MATLAB Simulate Hysteresis Loop in MATLAB | Step-by-Step Tutorial"

    Hi there, Would anyone help me in simulating hysteresis loop in MATLAB? Thank You!
  17. J

    MATLAB MATLAB trouble with reshape and random matricies

    I am trying to learn MATLAB with MIT OCW and I am running into some trouble. It says as an assignment: c. cMat = a 10x10 matrix where the vector 1:100 runs down the columns (use reshape). so 1 11 21...91 2....92 . ..... 10...100 is the matrix I am trying to make and another...
  18. W

    How to Create MATLAB Code for Geometrical Optics Image Transformation?

    Hello all, i have frustrating task in my lab... i have to generate a code in MATLAB that will get the focal length and the object distance from the lens, i.e image (1000X1000 pixels). transfer it through the lens and, for the output it should be the result of it...
  19. O

    MATLAB MATLAB FFT: Zero Out DC Component for Better Frequency Analysis

    Hello, I am hoping someone can give me some advice. I need to zero out the DC component of an FFT I have done, so I can get a better look at the rest of the frequency components, so how would one go about doing that? I am not looking the code, just some advice ...I have just really started...
  20. P

    MATLAB Customize 3D Function Markers in MATLAB with Texts - Quick Guide

    Hello, I am working on MATLAB and I want to plot a function in 3D. However, I want the markers to be a letter instead of the markers provided by MATLAB. Is there a way I can do this? Thanks
  21. K

    MATLAB How can I change the x and y-axis limits in Matlab to arbitrary scales?

    Hello, I have an image which gets displayed and has the x and y-axis ranging from 0-812 and 0-607 respectively. This is because these are the pixel sizes for my image. I would like to change the x-axis to show -3.85, 3.85 and for the y-axis to show -2.9,2.9. However, when I load my image into...
  22. S

    MATLAB Solving Matlab Error: "The Expression to Left of Equals Sign

    i have tried for an hour but have been constantly getting an error saying "The expression to the left of the equals sign is not a valid target for an assignment".what should i do? i need the expression E=[Z*(r-1/D)+exp(Z*(r-1/D))-1].*exp(-r.*Z).*1/(r-1/D).^2 ; please reply asap
  23. J

    MATLAB How to do a dynamic graph in matlab

    Hi guys, so I've never used MATLAB before, and i need to make a plot that changes constantly. Let's say that i have Sin(x) from 0 to 3pi Then i need it to change to a Cos(x) from 0 to 3pi then to a Tan(x). I could do it in other languaje like Php or c, but in MATLAB i have no idea. I...
  24. A

    MATLAB Integration of a 2D matrix using MATLAB

    How to do integration for a 2D matrix using MATLAB? That is to say, suppose I have a bunch of data points over a rectangular region in xy plane, how to find the integral over this plane? More explicitly, suppose I want to integrate over a square region, [0,4]x[0,4] my data is 2 4 5...
  25. S

    MATLAB Study material for CFD using Matlab

    I want to learn some basics of Computational Fluid Dynamics.But most of the books that I found dealt mostly with the theory of it with very less examples or problems to be solved numerically. I know Matlab and am pretty good at coding too.So, I am searching for a book from which I can learn CFD...
  26. B

    How do I solve for H in matlab?

    I need help implementing this bit of code into matlab. I have a known matrix lest call it Z. and I have another unknown matrix called H. The matrices are related by the following relationship. Z = HTH How do I solve for H in matlab? If it is relevant Z is a make up of other known matrices and...
  27. N

    Matlab Recursion Problem - Need help Understanding It

    They give me this problem in my last exam, I did not get it right - its a very convoluted and I think poorly worded problem. Rants aside, how am I supposed to be able to answer a problem like this on the next exam? What sort of mindset will help me deal with recursion problems of this form? How...
  28. R

    MATLAB [Matlab] Transform generated table to equation for for loop usage

    I have posted a question on here before regarding the generation of a number sequence. I followed up that question with an answer. However, as I have developed my code more I need to use an equation instead of a lookup table. Note: I'm using MATLAB Given a matrix A of size r x c where r >=...
  29. G

    MATLAB Extract and rearrange data in Matlab

    Hi all, I need to rearrange my data. I have an excel file with 12 columns and 2045 rows, which I transformed that into a .mat. I need to query my data rearranged as follows (cf. example matrix below): 1-sum all values of Col 3 if: a-they belong to a given value of Col 1 and to a...
  30. dexterdev

    MATLAB How to simulate 2nd order markov chain (if poss. Nth order) in MATLAB

    Hi PF, I would like to simulate N th order markov chain (not by means of hidden markov models, but ordinary markov chain) using Matlab. If n-th order is a heavy thing atleast 2nd or 3rd order will do. TIA
  31. dexterdev

    MATLAB How to do this vector operation in MATLAB ?

    Hi friends, I wanted a help in Matlab programming. I have some vectors as below : d4=cos(2*pi*293.665*(0:1/44100:.25)); f4=cos(2*pi*349.228*(0:1/44100:.25)); e4=cos(2*pi*329.628*(0:1/44100:.25)); g4=cos(2*pi*391.995*(0:1/44100:.25)); c5=cos(2*pi*523.251*(0:1/44100:.25))...
  32. B

    Matlab code for solving and plotting function x'(t) = 1 + t*sin(t*x)

    Homework Statement I am trying to solve and plot the function, x'(t) = 1 + t*sin(t*x) where x(0) = 0 and t_final = 1, in order to compare this exact solution to the approximations of Euler's and Improved Euler's Method. Can anyone help me with the code in order to solve this problem, and then...
  33. B

    MATLAB Matlab Code for solving and plotting function x'(t) = 1 + t*sin(t*x)

    Hi everyone, I am trying to solve and plot the function, x'(t) = 1 + t*sin(t*x) where x(0) = 0 and t_final = 1, in order to compare this exact solution to the approximations of Euler's and Improved Euler's Method. Can anyone help me with the code in order to solve this problem, and then plot...
  34. E

    MATLAB How to display all calculation results in Matlab

    Hi, How can I set Matlab to display all the calculation results? I am solving the system of ODEs with large spatial variable and time step distribution. If I set total time to 100 with time step of 1 only the results starting from t=50 are displayed. How to fix it?:frown: Thanks.
  35. T

    MATLAB How to convert GO TO (Fortran77) to Matlab

    I'm translating some code from Fortran77 to Matlab and I'm struggling due to the sentence GO TO is not valid in Matlab. Usually using sentences while I can solve the problem but in a particular case I don't know how to face it. To put in situation, i.e: code line 1 line 2 ... 128...
  36. MacLaddy

    Create an Interactive Animation of Sinusoidal Functions Using MatLab

    Homework Statement Create an animation of the following: Let x vary from -2pi to 2pi Let y = sin(x) Let z = sin(x-theta) * cos(y-theta) Let theta be the animation variable remember, you will need to mesh x and y to create a two-dimensional matrices: use the resulting arrays to find...
  37. S

    Finite Element MATLAB Code for Solving Boundary Value Problems

    Homework Statement Consider the problem $$-u''\left(x\right) = 1, \;\; 0 < x < 3, \;\; u \left(0\right) = 0, \; -u' \left(3\right) = u\left(3\right)+1.$$ Formulate a MATLAB code to produce the solution and plot the solution from 0 to 3. Homework Equations The Attempt at a Solution Multiply by...
  38. R

    MATLAB Matlab code for detection of location of a crack using natural frequen

    please help i have to write a MATLAB code for DETECTION OF THE LOCATION AND SIZE OF A CRACK IN STEPPED CANTILEVER BEAMS BASED ON MEASUREMENTS OF NATURAL FREQUENCIES the reference paper is DETECTION OF THE LOCATION AND SIZE OF A CRACK IN STEPPED CANTILEVER BEAMS BASED ON MEASUREMENTS OF...
  39. franciobr

    MATLAB MATLAB: How to add initial states to a circuit simulation

    Hello! I am having trouble using the SimPowerSystems library from simulink to simulate circuits (with the powergui solver). On all the circuits I have simulated so far either of the following happens: - Adding the initial current/voltage directly at the RLC branch block culminates into...
  40. R

    MATLAB Matlab: what is the right 3D plotting function for my code?

    Hi all, I have a simple question about 3D plotting. Consider this simple loop, which provides y and O for any x. and I am able to plot y vs O for given x. for Omega=0:.01:5 y(i)=(x*Omega^2); O(i)=Omega; i=i+1; end now consider I want to change the value of x, for x=0:.1:3...
  41. M

    Solving Rocket Launch Equations in matlab

    Homework Statement A Super Loki rocket (http://en.wikipedia.org/wiki/Loki_(rocket )) is used to launch a small payload to above 100 km altitude in a sub orbital flight. Ignoring atmospheric resistance, find the apogee using both numerical and analytic techniques (solve the differential...
  42. M

    MATLAB How can I solve an equation with an integral in MATLAB?

    hi people, I've just recently started using MATLAB (last week) and 've already got plenty of problems. Could anyone help me with this for example [??]: 1) 3=∫(0,inf) (sqrt(ε)/exp[(ε-μ)/(8*T)] dε so this is the equation. I would like to solve in a way that μ=... , and then plot the...
  43. E

    MATLAB How code the following expression into Matlab

    Hey, guys How can the following equation be entered into matlab: http://i074.radikal.ru/1304/fe/a8b8e0fccbe5.png Thakns.
  44. E

    Divide and Conquer, Matrix Multiplication MATLAB

    Problem Statement We are asked to use the following divide and conquer algorithm to get the solution for the multiplication of some matrix A and some matrix B. (See below) Consider the matrix sizes. Comment the total computational time used on the following three algorithms, when different...
  45. A

    MATLAB Error Message while trying to Plot Magnification Factor

    Homework Statement I am trying to make a plot of the magnification factor of an underdamped vibrating system versus the frequency ratio using MATLAB. However, my MATLAB skills are very basic and I keep getting an error message. Basically I am trying to plot: MF=1/√((1-r^2)^2+(2ζr)^2)...
  46. Kudaros

    MATLAB Droplet Profile in Matlab- ODE stability

    Hello, I'm currently modeling the profile of a droplet (sessile drop, axisymmetric) in matlab. I've coded differential equations, applied the solver, and I get a reasonable result, except that it spirals continuously. The ODE's in question are: \frac{dx}{ds}=cos(\theta)...
  47. P

    MATLAB Differential Equation formulation (and execution in matlab) problem

    Hello, I am trying to solve an equation and then execute it in matlab. It is dx/dt=I(S*A*x). so I am trying to see the evolution of x with time. The variables are all in an excel spreadsheet in different columns and the name of the columns are the name of the variables. 'I' is in an...
  48. I

    MATLAB Decoding a Playfair Code with Matlab: Tips and Tricks

    Hi all, I hope my post is in the right section. I need some help with decoding a Playfair code. I only have the ciphertext which is 22 lines long. What's the best way to do this? I red that I have to do some frequency analysis of the English bigrams which I did. There's one combination which...
  49. L

    MATLAB Matlab and arduino: serial port connection

    Hello, I am trying to hook up MATLAB to my arduino. I am trying to write a number to the serial port in the arduino IDE and retrieving the same number in the MATLAB IDE. My arduino code is: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); }...
  50. E

    MATLAB Stability issues of ODE solutions using Matlab

    Hello, guys I am struggling with attaining stability values for u in solving the diffusion equation. The stability of u depends on the value of r from : D=1000; r0=1000; std=1.0; tau=1.0; IP=2500; %initial pressure % % Radial grid and inhomogeneous term nr=51; dr=r0/(nr-1)...
Back
Top