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

    MATLAB Help with MATLAB music code | Signals & Systems

    For my signals and system class were creating music. I am given a structure with three variables, frequency/notes, duration, and pulse. ex: frequency(in note numbers which i then convert to frequencies)[44 45 47 50...]. duration[2 1 1 3 4...] with pulse duration being .25s and pulse[1 3 4 5 8...
  2. Okinawa Rikenata

    How to get x-y coord. from x-z coord. and y-z coord.?

    I have data from tiltmeter. It has 3 components (time, x, and y) and stations. I use Matlab for calculating the data (.csv) until i get some plots. I have two plots, time-x and time-y. Each plot has a trendline. So that means i have two trendlines in two plots. Assume that time is z and x is...
  3. M

    I Relativistic particle in non-uniform magnetic field (math)

    Hi everyone, I am currently working on a project in Physics analyzing the possibility of magnetic fields protecting against radiation particles such as fully ionized nuclei or electrons. I wrote a code in Matlab that simulates a 3-D magnetic field based on a combination of wires and wire loops...
  4. W

    MATLAB Plotting animations (time-evolution)

    Hi all, I have a spatial probability density function that is dependent on ##x##, space and ##t##, time. I am able to make a plot for spatial probability density for each point in time by specifying ##t## values by using the fplot function. However, I want an animation that allows me to see...
  5. M

    MATLAB Numerical Integration with variable limits MATLAB

    Hi PF! Suppose I have two functions ##f(x),\,g(y)## that are numerically defined as vectors (i.e. ##g(y) = [0,1,4,9,16]:y = [0,1,2,3,4]## and say ##f(x) = [0,1,8,27,64]:x = [0,1,2,3,4]##) and am trying to compute $$\int_0^1 f(x) \int_x^1 g(y)\, dydx.$$ How would I do this in MATLAB? I could be...
  6. starstruck_

    MATLAB Using MATLAB outside of the lab

    This is a pretty dumb question, but I honestly just need some advice as to which option to go for. I'm in first year and one of my courses this term is computer science where we will be using matlab. Matlab isn't free- I know that, but my professor said we have two options available for us to...
  7. Cassius1n

    MATLAB Does anyone had this plotting problem with MATLAB?

    I have finsihed my work on an orbit propagator in MATLAB and now I'm trying to simulate the orbit with the help of the main script. tspan=[0 :860]; Position and velocity y0(1,1)= 743322.3616 ; y0(2,1)= -6346021.219 ...
  8. C

    MATLAB Help: Convert Matlab to Python code

    I'm working on a convolutional neural network project that classifies histopathological images of breast tumors. All my code is in python. Part of the image preprocessing involves appearance normalisation to account for the variation in histological staining. The only code for the preprocessing...
  9. J

    Compensator Design in system control

    Hello, in my final project for System Control i have been stuck for some time on this following task What i cannot figure out is how to make all these condition work at the same time. When I tried designing a PD controller in sisotool or MATLAB for the i and ii part it worked but i couldn't...
  10. C

    MATLAB function within function handle output

    Homework Statement MATLAB The funciton "rockdynamicstage" outputs a matrix 4 by x, where x is somthing around 300( varies). The funciton "rockdynamicstage" is within the funciton handle "sim" with an input of gama0. (PayMass,Masstages,Massfrac,Thstage,IspStage,ChangeTstage) ar parameters that...
  11. Jayalk97

    Problems designing an FIR band pass filter on MATLAB?

    Homework Statement So I've been tasked with designing and band pass filter for my signals class. We're given the specifications that it needs to go from 200-5000Hz, and we need to use a kaiser window as the window function. Homework Equations There are 2 parameters, beta and N, given by these...
  12. F

    MATLAB Symbolic calculations in MATLAB

    Hello Everyone, I am not sure of when to use symbolic calculation and symbolic function in Matlab. For instance, we can set the domain of a function x=1:10 and plot the function y= x.^3+3 numerically to plot a graph and calculate numerically the derivatives, etc. That said, I am not sure of...
  13. D

    MATLAB Mastering Matlab: Graphing Functions Made Easy

    The MATLAB command plot plots points in a two-dimensional figure and connects them with straight line segments. So, here $y$ is a vector with $n$ entries $(1; y(1)); (2; y(2)); (3; y(3)); : : : ; (n; y(n)):$ So the MATLAB command is given below for an example: y = [1 -3 3 -4]; >> plot(y)...
  14. D

    MATLAB Matlab Sim Code for ODE & Gillespie for Reversible Reaction

    Here is the code you input into matlab. Aini etc, are the initial values of the population densities. A for predator, B for Prey. % example for ODE and Gillespie % one reversible reaction b1 = .033; bo = .00047; a1 = .0022; ao = .00055; Aini = 5168; Bini = 34; %% Basic ODE simulation...
  15. TaylorLL

    MATLAB MATLab: Not enough inputs for nlinfit

    Hello! I'm trying to plot a best fit for some generated EQ data and I'm having issues with nlinfit. My code is as follows and when I try to run it, I get an error referring to the anonymous function ("test"), nlinfit (from Matlab), and not having enough input arguments. %Test function t =...
  16. D

    MATLAB Matlab code for a Gillespie type reaction (model) with wolves and elk.

    Copy and paste if you want to use any of this code. Its a simple iteration of converting biomass of elk into new wolves. % example for ODE and Gillespie % one reversible reaction b1 = .033; bo = .00047; a1 = .0022; ao = .00055; Aini = 5168; Bini = 34; %% Basic ODE simulation dt = 0.01...
  17. PainterGuy

    MATLAB Fixing a Matlab Code: Help Needed for Fourier Transform Calculation"

    Hi Could you please help me to fix the code below? I know that the code is completely wrong but I have tried to write it down so that you can get an idea what I'm trying to do. Thank you. %%file name fourier.m clear all; close all; clc; f = 0; %% 0 Hz to 100 Hz, with 0.1 step...
  18. M

    MATLAB Solving Linear System with Eigenvalues in Matlab

    Hi PF! I am looping through a linear system and each time I do I generate a new matrix, call this matrix ##A##. When finding the eigenvalues of ##A## in Matlab is use [a,sigma2M] = eig(A);% a eigenvector and sigma2M matrix of eigenvalues sigma2(:,ii) = sum(sigma2M);% create matrix with rows of...
  19. C

    MATLAB Graphing Matlab Heat Transfer | T_0 Variable

    I'm working with heat transfer and need to graph theoretical results. I've tried several things and it will either throw something along the lines of "no explicit solution found" or just hang forever. I'm not new to programming, but I am new to the Matlab library. The only variable is T(t). T_0...
  20. M

    MATLAB Understanding Autocorrelation in Matlab: Exploring Functions for Different Lags

    Hello everyone. Iam a little bit confused about the autocorrelation and using Matlab so I hope someone can help me out. As far as understand Matlab computes the sampled autocorrelation where the lag between the samples is given by x(n)* x(n-l). Buy what if the autocorrelation depends on the...
  21. Wrichik Basu

    MATLAB Top Books for Learning Matlab: Beginner to Advanced Level with Java Knowledge

    I've recently started to learn MATLAB (self-study). I first tried to learn by an app on Google Play, and work out the examples on the Matlab app. But the app is very bad, and I can't understand anything after a while. What books can I use for learning Matlab? I have a good knowledge on Java...
  22. N

    MATLAB In MatLab How can we stop/start process during processing?

    I have tried to write MATLAB code for creating animation by using linear transformation, so I want to stop process during processing and then start process during processing. such I have stopped process for 5 seconds after that I start process.I don't know a command that should be used in my...
  23. I

    MATLAB Small matlab code not working. Why ?

    Code is the following : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% xiter=[0.7 20 10]; mubeton=[0.100 0.80 0.70 0.60 0.50 0.25]; muair=[0.05 0.042 0.04 0.032 0.021 0.011]; zl=[5 30 70 100]; fnorm1 = @(d,a0,dmax) (a0*(1-exp(-(0.5*log(d./dmax)).^2))+exp(-(0.5*log(d./dmax)).^2)); fnorm2 = @(d,dmax,DRL)...
  24. S

    MATLAB Separation of variables in MATLAB

    Hello, I haven't found any program that can be used to perform separation of variables on difficult PDEs. Is there such a method somewhere?
  25. M

    MATLAB Efficient Method for Constructing Matrix of Products in MATLAB?

    Suppose we have two vectors ##a = [1,2,3]## and ##b = [4,5]##. I want to construct the matrix of products, i.e. $$ \begin{bmatrix} 1\cdot 4 && 1\cdot 5\\ 2\cdot 4 && 2\cdot 5\\ 3\cdot 4 && 3\cdot 5 \end{bmatrix} = \begin{bmatrix} 4 && 5\\ 8 && 10\\ 12 && 15 \end{bmatrix} $$ Does anyone know an...
  26. kostoglotov

    Nyquist and FM and Signal Mixing....

    In an assignment I have, we are told to implement a Frequency Modulating function without using any of MATLAB's in-built functions, and not to use it's integration function either (use cumsum instead). I've been getting a lot of problems trying to solve these assignment problems without telling...
  27. kelvin490

    MATLAB Solving equation with integration using MATLAB

    I would like to solve an equation below using MATLAB: All the parameters except p are known, so I only need to solve for p. However since I need to consider the sign of the integrand and there is an absolute value sign in it I don't know how to solve it. Could anyone please help? Thank you.
  28. P

    MATLAB Sliding mode observer in Matlab or Simulink

    Hi, I have designed a variable-based observer analytically on paper. Now it's time to implement it in Simulink/matlab. Suppose we have followings in a tire model. The EOM says: J\dot{\omega} = T-R_eF_x m\dot{v}_x = F_x where J is the inertia of the wheel, \omega is the angular velocity , m is...
  29. S

    MATLAB Weighting data points with fitted curve in Matlab

    Hi all, I'm currently in the middle of performing an experiment for the final project of my MSc, and I have a question about how I should go about weighting the data when fitting a curve to it using the MATLAB fitting tool. Firstly, a bit of background about the problem. I am seeing how low...
  30. Abdul Wali

    MATLAB Matlab Derivative block analysis and filter design

    Hi, May someone helps me regarding this!? i have a controller which will control AC motor as attached. in this controller, a stage comes where I need to use a Derivative Block before point 'B' as shown in the attached picture " controller block diagram" [...
  31. A

    Programmes to learn for Nuclear Engineering Masters

    I am about to begin an MSc in Nuclear Engineering. I am competent in MatLab language but wish to practice/learn another in the time before my course starts. Would I be well served in continuing to practice MatLab or to learn another from scratch (C/Java/Labview)? Are there any particular areas...
  32. M

    MATLAB Solving MATLAB to Excel Copy Issues

    Hi PF! I am trying to copy info from MATLAB to Excel via the following code filename = 'testdata.xlsx'; A = [12.7 5.02 -98 63.9 0 -.2 56]; xlswrite(filename,A) but I receive the following warning: Warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV...
  33. P

    MATLAB Simulink: designing a 2nd order sliding controller

    Hi, I've had obtained a mathematical model for the slip controller issue. As you see I have the diffequation for the slip. and the input that force the system to zero error is provided as well. Now it's time to implement it in simulink or matlab. I took a look at the example provided on...
  34. Monsterboy

    Elliptical paraboloid surface in matlab using F/D = 0.3

    Homework Statement To generate a elliptical paraboloid antenna surface in MATLAB using the given F/D ratio (= 0.3) F- focal length D- Diameter = 50 m Homework Equations ## \frac {F}{D} =\frac {1}{4tan(\theta/2)} ## ## F = \frac {D^2}{16H} ## H = height of the paraboloid Equation of a...
  35. kelvin490

    MATLAB Matlab -- how to make a smooth contour plot?

    I want to represent data with 2 variables in 2D format. The value is represented by color and the 2 variables as the 2 axis. I am using the contourf function to plot my data: load('data.mat') cMap=jet(256); F2=figure(1); [c,h]=contourf(xrow,ycol,BDmatrix); set(h, 'edgecolor','none'); Both xrow...
  36. Joacim Jacobsen

    I Intersection between line and cylinder

    I have an expression for a "line- to sphere intersection" that works: a = 1 + Ax^2 + Ay^2 b = 2*(-zs + Ax*(Bx-xs) + Ay*(By-ys)) c = zs^2 + (Bx-xs)^2 + (By - ys)^2 - R^2 This is part of a code in Matlab, and works fine. It is derived from substituting (x=Ax*z+Bx, y=Ay*z+By) into...
  37. M

    MATLAB MATLAB and averaging without NaN

    Hi PF! Let's say we have a vector ##x = [1, \,2,\, 3, \,20,\, 4,\, 5,\, 30,\, 6]##. I am trying to loop through and find the magnitude of the derivative of each ##i^{th}## element with unitary spacing, and if that derivative is sufficiently high, I make that element NaN and continue. Example...
  38. J

    MATLAB Books to read for Matlab, C++, and Circuits?

    Hi I am an undergraduate EE student into my 3-4th year. I feel like my fundamentals are not so good at times and I want to improve. I want some recommendations on what books to read to really help improve my fundamentals. I really don't like the textbooks we are reading. They are just too broad...
  39. J

    MATLAB Highlight an object in an image?

    Hi Everybody I'm a new user and hope I have posted in the correct section. I'm a beginner in MATLAB and image processing. Using matlab, I have to highlight in an object in an image. I have an input image where there is a plate with a food. I need to produce an output image where only food is...
  40. D

    Matlab expressions for two types of odd polynomials

    Homework Statement i am trying to find the expressions for the "equiripple" and "maximal flat" polynomials for the equiripple :[/B] for maximal flat: Homework EquationsThe Attempt at a Solution i know that for maximal flat its butterworth polinomials, but for P_3 i don't get the same...
  41. Addez123

    How does image matrix filters work in matlab?

    I got an image called img and I want to sharpen the vertical spatial lines. I created this matrix: hp = [-3 -2 -1 12 -1 -2 -3]; hp= rot90(h_lowp); Then I do this to get the new image: newimg = uint8(conv2(single(hp), single(img))); It SORTA works, but I'm not so sure why it works. I mean all...
  42. N

    MATLAB Why 2 vectors are not the same in matlab?

    I have 2 vectors: a = 1.0e-04*[0.110000000000000 0.140000000000000 0.140000000000000 0.140000000000000]; b = [0.000011000000000 0.000014000000000 0.000014000000000 0.000014000000000]; by look at by eyes, it seems similar; but when I use this command: a == b then I got...
  43. F

    MATLAB Question about representation of data in Matlab

    Hi everybody; I have plotted a matrix with sea surface temperature's correlation with another variable, the size is (360x180x12); using to plot : figure for i=1:12 subplot(4,3,i);imagescnan(loni,lati,squeeze(double(r4_sat(:,:,i)))'),colorbar; end Now, I want to plot over it another matrix of...
  44. jamalkoiyess

    MATLAB How to create distinct circles in Matlab?

    I want to create a plate of distinct circles on Matlab where their radii are generated by randn(1,p) and centers are random. I am currently doing the circles using viscircles, but some of them are overlapping, and since I want approximately 100 ones, this problem only gets worse. How can I make...
  45. N

    What is preventing me from achieving better accuracy for this delay?

    I have 2 PERFECT data of the transmitter and receiver. From 2 data, I can calculate the delay estimation: Fs = 8e6; % sample rate ... for i = 1:2 [cc_correlation,lag] = xcorr(signal2(i), signal1); [cc_maximum, cc_time] = max(abs(cc_correlation)); cc_estimation...
  46. N

    How to calculate standard deviation?

    I have 2 signals: signal1: https://www.dropbox.com/s/zr04pff9skeh8cn/TX.dat?dl=0 signal2: https://www.dropbox.com/s/h436a915dd99hln/RX1.dat?dl=0 signal2 represents for 20 measurements, each measurement combines with signal1 to get time delay estimation using xcorr. So, I will have 20 delays...
  47. N

    MATLAB I with matlab designing a steady state feedback H2 control system

    Hi everyone. I'm designing a steady state feedback H2 control system. Actually, my major is tribology and I have no experience in designing control system. So it is really big problem for me. Anyway, this is my simple model of tribometer which applies normal load on the surface. (is it...
  48. B

    MATLAB Exploring the 2D GrayScott Model with MATLAB

    Dear Community, I was trying to reproduce the 2D GrayScott model given either here: http://blogs.mathworks.com/graphics/2015/03/16/how-the-tiger-got-its-stripes/ or here: http://www.joakimlinde.se/java/ReactionDiffusion/index.php?size=0 The reason was to create a nice screen-saver (so I am...
  49. Arman777

    MATLAB Matlab Power Fit on Graph-Codes

    I have some data and I need power fit.And display it on the graph.But I couldn't find the right codes for it.(I need codes) Here my graph, Here my codes, >> x=BN(:,2); >> B=BN(:,1); >> plot(x,B,'go') >> plot(x,B,'go') >> hold on >> xlabel('Distance (m)','Fontsize',21); >> ylabel('Magnetic...
  50. hilbert2

    Comparison of high-level computer programming languages

    A little question about the appropriateness of a certain research subject... Would it be useful to make a study of the computational effectiveness of equivalent codes written with Matlab, Mathematica, R Code, Julia, Python, etc. in a set of typical computational engineering problems like...
Back
Top