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.
I am creating a gray-scale image of a 2000*2000 matrix using mat2gray and imshow command.But highest number of matrix entries that imshow can implement is 500*500 approximately.After that it shows------
"Warning: Image is too big to fit on screen; displaying at 8%
> In...
Hello everyone! I'm a aerospace engineering student. I'm working in my own program for blended wing body aircraft parameterized design.
I'm triyed to use Tornado program but it doesn't even allow me to setup the geometry, after introducing the chord the program goes in a bucle and when I stop...
Hey all,
I want to calculate the stress and strain on a beam using MATLAB and I would also like to make a stress-strain curve as well. The problem is as follows:
I have a hollow rectangular aluminum beam that is fixed at both ends. I have the material properties and the dimensions of the beam...
I have a 1×N Green function in energy domain. I want to use the FFT (fast Fourier transform) for this Green function in MATLAB. But this function is non-periodic. Could you help me about this? How can I change the energy interval to convert Green function as a periodic function?
Hi,
I saw some threads about MATLAB books already but the seemed a little outdated ~2008. I was curious to know if there was any good books to read as a tutorial of matlab. Potentially a pdf online would be cool as well.
One thing too is I won't be taking the course at school until September...
At this exact moment, the proper name of functions defined by:
f(x) = ∫0xf(t)dt escapes me, so I apologize for the title maybe not being as clear as possible.
What I'd like to know is how to go about defining such a function so that I can plot it. Do I just put the variable x into the upper...
do you have imaging processing' document in matlab? can you share with me?
Do you have code MATLAB about increase form yellow to red?
Thanks your attention
hello people,
I have MATLAB R2014a installed in my system, i would like to do some electrical simulations. Unfortunately I am unable to find SIMSCAPE in my library. Can anyone suggest me how to get it.
thanks in advance.
Homework Statement
Homework EquationsThe Attempt at a Solution
look at line4, did I enter it correctly?
I must have did something wrong because there is no contour at all, all i see are parallel lines.
Hello,
I'using Matlab to simulate phase shift in frequency domain (FD).
I have got real and imaginary parts of the signal after FFT.
I'd like to use phase shift in FD.
This works:
Y=fft(y);
YY=Y.exp(-i*2*pi*nk/N*samples_delay);
result=ifft(YY);
But in my DSP I can't use the formula above and...
Hi PF!
I am trying to solve a pde in MATLAB and started by using the generic code mathwork supplies and then augmenting for my purpose. After defining the function below and run the script, i can do anything to the ##f## and nothing changes. I can literally delete the line and still I receive...
Hi guys I'm doing some homeworks for my professor, the homeworks are some MATLAB scripts that consist in creating and running some functions. The professor is requesting that the results obtained must be written in a file using the command fprintf.
I have tried to understand the mechanics of the...
I have an optimization algorithm running 50 full trials with up to 10,000 iterations each (it breaks off if the error goal is reached before that). I want to export the iteration number and the best function value at each iteration to an excel file, then after each trial completes move to the...
I am trying to achieve real time plotting of accelerometer data using an arduino, an Xbee, and Matlab. Usually when the Matlab program gets data, it gets something like this:
~ #� ' X: -2 Y: 20 Z: 4080 t: 33232
~ !� ' X: 4 Y: 2 Z: 4066 t: 33255
b~...
If you are a professor is it better to use Mathematica or Matlab when it comes to publishing papers, which program creates the best graphs. I have origin as well.
Homework Statement
A common way of displaying the distribution of a random variable is by a histogram. Consider the interval [a,b) divided into M sub-intervals (bins) of length ΔX. Given a set of N random values of x, call Nj the number of values that fall within the jth interval.
Homework...
Hi all
1. Homework Statement
I have a function script for doing some analysis of data from a text file and making some plots. My script takes the filename as an input argument - this is very helpful for running the analysis over multiple files and replicating results.
However, I have also...
Hi all,
I have this dynamic:
is a Mean Reverting process. I want to simulate the sde with MATLAB but I am a beginner and I have some problems. I show you the code that I have created:
%% Simulazione prezzo Geometric Ornstein-Ulenbeck
clear all
clc
%Parameters
mu = 0.5;
sigma = 0.12;
eta =...
Hi, I have a problem of integration in Matlab. I want to integrate the following equation:
y=x/(exp(x)-1)
and x is from 0 to 1.
I use int(y,0,1), but it seems that it does not give correct result.
Could you help me how to do it in Matlab? Thanks!
I'm trying to simulate the Fresnel Diffraction in MatLab using the Fast Fourier Transform syntax. But I'm not getting really good diffraction patterns. Here is the code:
%% Fourier Transform for G(p, q)
g = layer.*exp(((1i*pi)/(lambda*z))*(r_obj));
G = fftshift(fft2(g));
%% Fourier Transform...
I have what I think is a valid solution, but I'm not sure, and when I try to check the answer approximately in Matlab, I don't get a verified value, and I'm not sure if my analytic solution or my approximation method in Matlab is at fault.
1. Homework Statement
Evaluate the integral...
%PLOTTING TIME DEPENDENT MOTION OF A STANDING WAVE
%Define Parameters
a_n = 1;
k = 5;
w_n = 5;
x = 0:0.05:4;
t = 1:0.05:20;
for j=1:length(t)
for i=1:length(x)
u(i) = a_n*sin(k.* x(i)).* cos(w_n.*t(j)); %Formula for displacement
end
pause (0.1)
plot(u)...
Equation 1:
Equation 2:
Equation 3:
Equation 4:
Equation 5:
I would like to solve , (not the one with a star)
and i want to define values for p, η0, ηr, θ0, θr.
i have tried to solve them, but didn't work,
can someone please help and show me step by step?
Homework Statement
clear all;
close all;
totalanswers=zeros(100,4);
k= ;
flag =0;
for i =0:25
a=i;
if flag ==1
break;
end
and so forth for a,b,c,d, etc for a finite set of values all have the break values too.
x=[ a,b,c,d];
does some math calculationhere is a...
Hi,
I'm using MATLAB R2011a in my project, involving matrices of dimensions up to (70 × 20). I had good results, a time ago. Currently, poor results are generated using the very same code -(of good results)- with same parameters settings & relatively smaller matrices (30 × 20) !
I tried...
I have a vector for instance
x=1:200;
and three functions of this vector as f(x) and g(x) and h(x) numerically. I want to find the values of the constant coefficients c and d in "cf(x)+dg(x)=h(x)". Is there any way in Matlab to calculate these coefficients directly?
I am doing a project on image processing and I need to solve the following set of equations:
nx+nz*( z(x+1,y)-z(x,y) )=0
ny+nz*( z(x+1,y)-z(x,y) )=0
and equations of the boundary (bottom and right side of the image):
nx+nz*( z(x,y)-z(x-1,y) )=0
ny+nz*( z(x,y)-z(x,y-1) )=0
nx,ny,nz is the...
Dear Friends! I need to find roots of polynomials with variable coefficients, The command I used is
w=0:50
A=w^2
B=w^3+2
C=w+2*w^2
D=w
E=w./2
ss=[A B C D E]
xi=roots(ss)
by this I find all the roots of equation,
I want to find velocities by setting
v1=w/xi(1)
v2=w/xi(2)
v3=w/xi(3)
v4=w/xi(4)...
I'm trying to create a vector field plot of an equation in x and y.
Basically, I would like to create a function F(x, y) = p(x, y)i + q(x, y)j that defines a force field, and have the field direction and magnitude plotted at points in the x-y plane, and both components of the vector are...
I know from the Fourier Analysis
that any signal can be represented
as summation of elementary
signals i.e. basis functions
.Likewise,any image can be
represented as summation of Basis images.
Is there any available code, or
even an algorithm, that would
allow me to compute Basis images
of an...
hi dear
i have a question.
i have equation
(1/α ) dT/dt =d2T/dr2 +1/r dT/dr +d2T/dz
T=T(r,z)
T(Ri,z)=Ti
T(Ro,z)=To
T(r,0)=To
dT(r,L)/dz =0
by finite difference method O(h^3) and this question's MATLAB program. is there anyone who can do it ?
it is very important for me
tnx
Hi!
I have a question about an assignment.
It is about throwing a rock which should land 20 meters away from the "shooter". My job is to find the angle "a" which makes the rock land 20 meters away.
The motion is given by a multivariable, second order differential equation which I have already...
Hi all!
I am trying to solve a system of partial differential equations in Matlab, with both derivatives in time and space domains. I am using the pdepe function for that.
The system is, to be simple, a sort of solar thermal panel, made of three layers: an absorber plate, a fluid layer of...
I am beginer in image processing. Any signal whether it is 1D,2D or any multidimensional signal can be represented using combination of number of sine and cosine wavesforms (harmonics).Similerly any image can be termed as a function of sinusoidal signals.I want to see individual pattern for the...
I would like to reproduce results from a much older code to test a new one. I only have the old code's results in the form of plots, not data, but I need data. The older code solves the unsteady vorticity transport equation in 2D with a constant kinematic viscosity term. I'm interested in 2-D...
is learning MATLAB like learning c++ where it takes like a year of programming everyday to get good at or is it a smaller programming language? I just finished learning html at codeacademy.com and it was very easy to learn and I learned it fast, is MATLAB larger than html? If you used MATLAB...
Dear all,
I'm an electric engineer, and I usually work with software as Ansoft Maxwell, Matlab, Ansys, COMSOL...
I need a PC for serious professional simulation, and I would like if someone can give me some tips of the characteristics I should ask for this purpose.
I don't want to spend more...
Homework Statement
This is not homework but I am trying to solve a problem to see to general a set of numbers for the grassmanian equations to use in something else.[/B]
I have five variables a,b,c,d,e. a-b,a-c,a-d,a-e,b-a,b-c,...etc so that none of them are the same so it generates all...
Homework Statement
Homework Equations
[/B]
----------------------
function [C]=mymatmult(A,B)
[L1 C1]=size(A);
[L2 C2]=size(B);
if C1 ~= L2
error('dimension mismatch');
end %if ERROR
C=zeros(L1,C2);
for i=1:L1
for j=1:C2
C(i,j)=A(i,:)*B(:,j);
end %in for
end %out for
end %function...
Hi all,
I'm a newbie at MATLAB and currently trying to model a chromatographic process, I have a PDE to be solved in the form of c*D(C_RH)/Dz = D(f)/Dz + s (see code below for what functions c, f and s are made of)
I have defined constant values for each of the individual parameters...
hello there, i just want to ask some questions related to PID controller. currently, i have run zumo robot to detect line by using PID controller approach ziegler nichols method..however, by testing P,PI, and PID, P gives the most accurate when zumo follows the line..which is better actually? P...
Hi,
Has anyone tried to paste equations from MathType into Matlab ? I follow every step described here
No matter what equation I paste, I get following error in Matlab:
|
Error: The input character is not valid in MATLAB statements or expressions.
Homework Statement
I think this problem is supposed to be pretty simple, but I have almost no knowledge of how to use matlab. I was told to use this function: [V,D]=eig(A) to give me the eigenvectors (columns of matrix V) and the diagonal matrix with eigenvales in the diagonal ( matrix D). I...
hello,
I have 3 signals in the form of sampled values. When I plot them using
plot (t,vPa,t,vPb,t,vPc)
where vPa, vPb, vPc contains the values and t contains the sampling istants I get this:
when I calculate phase shift using fft I get phase angle = 0.
I have tried using my own code ( which...