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

    MATLAB How Can I Code the Rate of Reaction in MATLAB?

    Can Anybody help to code this in matlab A->B --- A is Sbbstrate here and B is Product Y[b][/a]=stiochimetric Initial values are A[0] and B[0] Q= reaction quotient R=active if Q<k ----- R is reaction R=Stops if Q=k t=...
  2. P

    MATLAB MATLAB question - meshgrid and sum.

    Hello, I am asked to evaluate the following expression using functions meshgrid, sum and dot operations in MATLAB: y = Ʃ(n=1 to N) xn*[cos(x2 + n2)/xn], where x is the vector of four equally spaced values from 1 to 2, N=10. Below is my attempt (I am quite positive it's incorrect, though): n =...
  3. N

    MATLAB How Do You Solve a Differential Equation in MATLAB?

    How to do you use MATLAB to solve this? dh/dt = 0.079577-0.066169*squareroot(h) where ho = 1.75 and hf = 1.46 and to=0
  4. E

    MATLAB MATLAB 3 equations and 3 unknowns

    Hello, I have never really used MATLAB before, and I was assigned some homework on it. While I was able to solve most of them, I was unable to solve this one in particular, even after searching the internet and documentation, there was many kinds that I was left confused. Does anyone know...
  5. beyondlight

    MATLAB How to Create a Grid on a Map in MATLAB?

    I am working on a Bachelors thesis and need to make a grid on a map over a entire floor. Can someone show me how to do this in matlab?
  6. R

    MATLAB Frisbee flight in Matlab, can't run (Input argument x is undefined)

    Frisbee flight in Matlab, can't run (Input argument "x" is undefined) I'm trying to use a frisbee flight simulation made by Sarah Hummel, but I'm having a hard time running it in Matlab. I get the first message when I press run in the program and the one in red when running in the...
  7. U

    MATLAB How do I differentiate in MATLAB?

    I find that I don't have the symbolic toolbox. Due to this, I'm not being able to differentiate by using the usual 'diff' command. However, just as one can integrate numerically, by using the quad and quadl functions, is there no way to differentiate numerically on MATLAB (like using the ab...
  8. S

    MATLAB How to Plot Piecewise Functions in MATLAB?

    Hello! I want to plot this function on MATLAB: f(t)=1 si 0<=t<=1 f(t)=0 otherwise Please help me! How to do it? I tried so much things it doesn't work!
  9. R

    How Do You Calculate Fields of a Hertzian Dipole Using MATLAB?

    Homework Statement a hertzian dipole antenna has a length of 5 mm and carries a 50 MHz current of 2 A. Find the magnitude of the electric and magnetic fields at a distance 15 cm away from the antenna and theta=30 degree. Homework Equations Attached the equations The Attempt at a...
  10. Z

    MATLAB Using Excel Sheet Values as Variables in MATLAB: How Can I Solve for X?

    Matlab... Please Help! Urgent... Hi mates, how can I use the values from an excel file as variable values in the equation below ? in other words...I need to use a lot of g values listed in an excel sheet and to find the value for x...or I ll import g values to MATLAB from excel and...
  11. D

    Matlab error message, help please

    I get this error message Subscript indices must either be real positive integers or logicals. Error in doubleODE (line 14) dYdt(2) = l1*(m1 + m2)*Y(4) - l2*m2*Y(3)*cos(Y(1) - Y(2))/... I am having trouble working out what is causing the problem. Any advice? Thanks
  12. F

    Using MATLAB to work out coin-flip style probabilities

    I've basically been set the task below however I've not really been taught how to go about it. I think I know the general theory of how to go about it but the actual commands and putting it all together bamboozles me. The question is attatched. Just seen the typo, it should be 'loses' not...
  13. E

    MATLAB Can't run my main Matlab file related to ODE solution

    Hey, guys Can you please help me to spot mistakes in numerical solution of following diffusivty equation: ∂P/∂t= 0.001127*k/(μ*ϕ*c_t )*((∂P/∂x)^2*c+(∂^2 P)/(∂x^2 )). Matlab give the following command: Undefined function or variable 'r'. Error in function_handle2 (line 9) for...
  14. S

    2ode using matlab without intial conditions

    Homework Statement I have question ,i want to solve ODE second order in matlab, but i want to get the answer in terms of constants, because i don't want to give MATLAB initial conditions Is this possible Thank you
  15. A

    What Is the Probability of Winning in a Gambler's Ruin Scenario?

    Hi guys, I have been given a problem to complete, but at the moment my progress has been minimal. I have only had two classes on using Matlab since September, thus I am not very experienced. To complete this problem I know I need to use nested For loops but I just don't know where to...
  16. H

    Create Banded Matrix in MATLAB - Step-by-Step Guide

    I'm trying to make a banded matrix in MATLAB like the one in my picture. I'm trying to use the spdiags function but I'm not going even close to getting the same matrix. I have tried the help in Matlab but have had no luck yet. How can you tell the bandwidth is 7?
  17. E

    Solving ODE w/ Matlab ode45: Error Message Explained

    I'm trying to solve an ODE using matlab's ode45, but I'm receiving the following error: Warning: Failure at t=4.509803e+01. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.136868e-13) at time t. Can anybody explain what this means?
  18. R

    What Is the Fundamental Domain in a ##\mathbb Z_{\frac{m}n}## Orbifold?

    ##\mathbb Z_{\frac{m}n}## orbifold Homework Statement Consider the identification ##z\sim ze^{2\pi i \frac{m}n}##, where ##m## and ##n## are relatively prime integers. Determine a fundamental domain for the identification. Homework Equations Given two relatively prime integers ##a## and...
  19. E

    MATLAB Trouble with Method of Lines Matlab

    Hello, guys I am struggling with solving the following ODE related to radial diffusion equation: du/dt=D*(d^2/dr^2+2/r*du/dr) For easiness I have attached the main m.file with general commands in Radial_diffusion.m pde1d.m contains function to be solved by ODE, and dss004.m contains...
  20. M

    MATLAB Why is my integral function not working properly in MATLAB?

    syms y int(2*y*(sqrt(1-(y-1)^2)),y,0,2) I plug this into MATLAB and I get the answer is negative pi. The entire integration region is positive. How is this possible! what the heck is going on? Just noticed that if I set the limits to 0.00001 and 1.99999 it works perfect. Can someone explain this
  21. M

    Calculating distance using matlab

    Homework Statement The speed of a race car during the first seven seconds of a race is given by: t(s)=0,1,2,3,4,5,6 v(mi/h)=0,14,39,69,95,114,129 Calculate the distance of the first 6 seconds. What I did is q=trapz(t,v)=395.5 answer is 776.6. Where did I go wrong? Homework...
  22. E

    MATLAB Interpreting Matlab function simp

    Hello, guys Hey guys, Got stuck with function integration using Simpson's rule and need your help. Please first refer to picture attached for full idea of my question: The Matlab command related to it is: for i=1:nr u1d(i)=4.0*pi*r(i)^2*u(it,i) end...
  23. Q

    MATLAB Solve Numeric Expressions in MATLAB

    dear friends when I run my code in MATLAB , some expressions like: "8763559185889905/20769187434139310514121985316880384" appear in my result, so if I want MATLAB to give the numerical value of these sentences, what shouls I type? for example in mathematica I know that I must write ...
  24. T

    MATLAB help, code for Frobenius norm

    Hello, I am trying to write a mtlab code to compute Frobenius norm of an mxn matrix A. defined by ||A||_{F} = \sqrt{ \sum_{i=1}^m \sum_{j=1}^n a^{2}_{i,j}} I have so far written this code, but it does not work, if anyone can help /guide me to the right path, would be greatly...
  25. Q

    MATLAB Solving smbolic equation in matlab

    dear users I must do a lot of calculation and after that,I arrive to an equation in which one side is a number (forexample 330) and the other side of equation is expression in terms of "m" I want to solve the equation for "m" But when I ren my cide in MATLAB it gives error that a symbolic...
  26. P

    MATLAB Implementation of Matlab Controllers onto real systems

    Hi All, I am an engineer with limited knowledge of the mechanisms with link hardware to software designs, for example in real time control systems, and wonder if you could help me understand what happens. Can somebody explain to me what the typical process might be; let's say for instance...
  27. Q

    [Matlab] Grid renumbering for Matrix

    Homework Statement I have a matrix A \in R^{m x m} where m = n^{2} and n = 2^{k} +1, k= 0,...,L. As in the image attached,the original numbering in the case k=1 is [ 1 2 3 4 5 6 7 8 9], i want the nodes to be renumbered to a new numbering T=[2 4 5 6 8 1 3 7 9] (meaning position 2 in...
  28. B

    MATLAB Trying a MATLAB program for AM transmission, depth issues.

    Hi there; I am trying to make a MATLAB program to do an amplitude modulation on a biphasic pulse. The equation I am using is the following: Vout2(i)= (Vc/1000)*(1+(depth.*cos(2*pi*Fm*(i/carrier_freq)))). Where Fm is the modulating frequency, carrier_freq is the frequency of...
  29. E

    Matlab help to designing a program of a falling object

    Homework Statement I'm currently new to Matlab and have just started trying to solve a few problems with it. So I have to make a program that will display the results of height and velocity of a falling object, as well as plotting the overall function. My main concern is I am using an...
  30. H

    How to Choose Values for N, N1, and N2 in MATLAB for Fourier Analysis?

    Hi I'm trying to use the fft function in MATLAB to compute the discrete Fourier transform of a box signal. I'm told to assume that the signal x[n] is periodic with period N and the vector contains one period. x[n]= box [n] I'm am going to use these commands to make my vector...
  31. E

    MATLAB Matlab vs Mathematica for DiffEqs: Accuracy?

    I wonder which one is more accurate when solving differential equations?
  32. matqkks

    MATLAB SVD and image compression for Matlab

    Are there any resources which use Matlab to image compress a colour image using SVD? I can only find information where I need to convert to gray scale first.
  33. R

    MATLAB Is a Matlab Textbook Necessary for Programming? Weighing the Pros and Cons

    I'll be doing a programming subject where the first half will be spent on Matlab then the second half on C. It has a prescribed textbook: https://www.amazon.com/dp/0495668079/?tag=pfamazon01-20 which solely focuses on Matlab programming. With all the resources available on the internet, is it...
  34. G

    MATLAB No idea where to start with this question (very new to matlab):

    Write a Matlab function mycirc(c,r) that will plot the circle whose center is at c[x0,y0] and whose radius is r. Then plot 100 random circles with c,r chosen randomly from the interval 0 to 1.
  35. M

    MATLAB DC conduction equation in Matlab

    Hello I am solving DC conduction equation in Matlab. My equation is 1/r * ∂/∂r [r*σ* ∂V/∂r]=∂ρ/∂t My equation is 1D(only varies with radius) and time dependent. i am using pdepe solver.The space charge ( ρ) is the time dependent variable. But the form of MATLAB pdepe solver the time...
  36. Q

    MATLAB Integrating a Complicated Function in MATLAB with Triplequad

    Dear users I want to get a triple integral from "X,y,z" in MATLAB like this: triplequad(f,0,1,0,1,0,1) but because my "f" is very very complicated function of x,y,z , it can not do it, so I want to convert my integral to a summation and istead of my integral limits I want to make sum in a way...
  37. E

    MATLAB Problems with a script in MATLAB

    Hi Guys! I am trying to plot two different graphs in the same window using MATLAB. I have some constants that I declare, I then plot the graph from 0 to 15 seconds. Then I change two constants and plot another graph from 15 to 30. The units along the x-axis is Time (seconds) and velocity along...
  38. C

    MATLAB Java/C++ vs Matlab in Image Processing?

    I just recently picked up MATLAB and still learning its syntax and built-in functions. I am working on a project that deals with image analysis, such as extract every pixels from an image and analyze them in forms of matrices. I am more experienced in Java than C++ or Matlab. I also feel...
  39. A

    MATLAB MatLab - Raising each component of a matrix

    I am in great need of the syntax that tells MatLab to raise the component of a vector to any power. I also need to know the syntax that outputs the time to perform the calculation. Thank you
  40. L

    Ramp Function in MATLAB? also window adjustments (MATLAB Help)

    1. I produced a unit set function in MATLAB however my professor requires me to use a ramp function to be multiplied to a signal to filter out unnecessary parts of an earthquake chirp, this is being used in my project to determine whether the chirp was caused by a nuclear bomb. 2. ideally...
  41. P

    MATLAB Concatinating signals on Matlab

    Hiiiiii Everyone , It is My First Post ...And I will be Very pleased if You helped me find a solution to my problem . well... It is a Matlab code & I have different type of signals (impulse ,Ramp, sinusoidal,Dc ,exponintial ) & the type of signal is determined by the user (...
  42. C

    How to Create a Step Load in Simulink for Frequency Observation?

    Hi Would anyone be able to give me some guidance on creating a step load in Simulink, I need this type of loading to observe frequency (slew rate) when a diesel engine with voltage control drives a asynchronous motor. I have most of the circuit built and am using Sim power systems mat lab v12...
  43. E

    2nd order initial value problem in matlab

    Homework Statement 1.)I want to write a function in MATLAB that contains the 2nd order function: 20*d^{2}x;(dt^{2})+5*dx/dt + 20*x=0 (dampened spring) -The function should have 2 inputs (time,[initial values]) initial values should be a vector of 2 values -The function should...
  44. G

    MATLAB Is fortran 90 or matlab better for simulating non-linear dynamics (Chaos)?

    I am going to be simulating damped driven oscillators for my project and I was wondering if someone could give me a definitive answer on the matter. I know MATLAB is more of a 'tool' than a language so I'm thinking the maths behind damped driven oscillators might be easier to implement into...
  45. E

    Matlab - plotting huge amounts of data

    I have a table of 100 data points. I want to plot this on Matlab. Is there any other way for me to do this other than making an array for each column and then plotting it?
  46. P

    MATLAB MATLAB ezplot Error: Get Help Here!

    Hi. I was writing the simplest code ever in Matlab when I got an error using the ezplot function. I wrote this script: syms z t; eq=2600*tan(z)-0.5*9.81*2600^2*(210*cos(z))^(-2)-350; theta=solve(eq, 'Real', true); x=210*cos(theta); y=210*sin(theta)*t-0.5*9.81*t^2...
  47. M

    MATLAB Why is MATLAB giving me a wrong answer when solving a minimization problem?

    In MATLAB, I am using fmincon to solve a minimization problem with nonlinear constraints. The problem is that, it is giving me a wrong answer, a point that is not a minimizer (not even close), and that is not within the tolerance. I made sure to use a feasible initial point. However, when I...
  48. M

    MATLAB Save Matlab Output: Easy Tips for Storing and Reusing Results

    I have some results in Matlab which are mainly cell arrays and numbers. I want to save these results(either in a .txt file or anywhere else) so that I can use them later to make a table, draw a graph, etc... What is the best way to do that?
  49. R

    MATLAB How to determine if a row appears more than once in an array in MATLAB

    I'm working on a project for myself that I started some time ago. This question only covers a small part of what I am doing. In my program I have vertices that I read in from a text file. They are read and stored in a matrix where each row of the matrix is a facet (triangle) created by the 2...
Back
Top