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.
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=...
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 =...
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...
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...
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...
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!
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...
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...
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
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...
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...
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
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...
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?
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?
##\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...
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...
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
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...
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...
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 ...
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...
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...
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...
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...
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...
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...
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...
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.
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...
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.
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...
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...
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...
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...
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
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...
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 (...
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...
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...
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...
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?
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...
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...
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?
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...