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.
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...
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...
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...
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...
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...
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...
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 ...
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...
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...
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...
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...
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...
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)...
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...
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 =...
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...
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...
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...
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...
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...
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...
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...
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...
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.
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...
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...
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" [...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...