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.
Hello everyone, I've stuck on a problem, and I need help
Problem:
1: a) Evaluate and store the sine and cosine values of the values from 0 to 260 10 by 10 and store them to the separated arrays called sines and cosines before plotting the sinusoidal graphs of these arrays, b) Evaluate the...
Hi Guys,
I'm trying to do a simple first-order, 1d (x-direction) simulation of mass transfer with the finite element toolbox in MATLAB for the following closed set of equations:
(Please note: "X" is not to be confused with the lowercase spatial dimension "x")
However, every time I...
Homework Statement
(I'm trying to replicate some results in an academic paper where they have calculated elastic properties of a crystal. Because I'm going to do a lot of similar time-consuming calculations following this one, I need to learn how to do them using a computer.)
The compliance...
Hey all, I was wondering if you can help me define the arguments for the dare() function of matlab. Here is the DARE form I have:
\begin{equation}
\begin{split}
\Phi(p_\infty) &= \Phi_\infty = \Phi_{33}-\Phi_{32}(\Phi_\infty+\Phi_{R})^{-1}\Phi_{23}\\...
Aloha guys,
I am just having trouble getting MatLab to output only the last variable of my "for loop."
If anyone can help all I am looking for is an example of notation.
p.s. I have done this before just not in a while and will continue to look through my old scripts and functions. just not in...
Hi,
I am a student in the Netherlands, currently 17 years old and at the end of my 'middelbare school', meaning that next year I'll be a bachelor student at a university.
I am doing an extended essay/research thing that is custom you do in your last year, with a friend of mine.
We picked the...
Here is my code:
while a ~= 3 || b <= 1;
a = a - 1;
(other expressions);
end;
For this code, the 'while' loop should stop when 'a' reaches 3, however it does not, even though 'a' starts with a higher value than 3.
The 'other expressions' part are calculations that manipulate 'b', the only...
The issue I am having is setting up the actual program for the problem. I am having trouble interpreting the code and, because of that, having issues getting it to work properly. The whole thing was written with Matlab and the goal was to write a function that could simulate the motion of a...
I'm trying to plot the solutions of the second order differential equation d^2R/dt^2 = GM/R^2 + Lz^2/R^3. I'm reducing this to a system of first order ODEs and then using RK4 to solve this system.
My code is given by
function RK4system()
Tsim = 10...
Hello everyone,
For those of you who are familiar with MATLAB and have worked with it in the past, I would like to hear from you guys about efficient and good ways to learn it from scratch. I would appreciate it if you can also specify websites, books, online courses or whatever it is that you...
I want to design a digital butterworth lowpass filter of nth order, with only freedom of choice to user being order of the filter and the cut off frequency, i already have a 1st order low pass.
Code:
T = 1/(2*pi*this.fc);
this.A = -1/T;
this.B = 1/T;
this.C =...
Hello.
I am using Linux platform to do Embedded System Programming.
I want to know the name of Integrated Development Environment software that runs on Linux or Windows (via Wine on Linux) and that has support for MATLAB and any circuit simulation software.
Also, please let me know a good...
Hey guys, so I wanted to give Matlab a shot regarding programming standalone applications but I keep getting the same error whenever I use "deploytool" in the command prompt.
The error message picture is attached to this message.
According to the error message I must change my MATLAB current...
I have a set of data as follows, How can I calculate the second derivative of the curve obtained from these data.
x=[0.1;0.07;0.05;0.03;0]; r=[-98.9407;-105.7183;-111.2423;-116.0320;-120.0462];
Here are my Fortran codes:
program test
implicitnone
integer*4 nxProjPad, cf, numViews, cc, index, indRad, iv, i, INDEX1, d, n
real*4 v4, v5, RSS, S1, F1, gMDL
real*4, dimension(:), allocatable :: array, sum, cumsum, transpose, log, SS1, SSs
nxProjPad=185
numViews=180...
Hey guys! This is my first day on the forum so, hey! I'm a third year electrical engineering student and I'm really having some trouble with Signals and Systems so I want to know what helped other people understand it so that maybe I could try some of their methods.
What were your biggest...
I would like to ask how to use MATLAB to append new columns into existing excel file without altering the original data in the file? In my case I don't know the original number of columns and rows in the file and it is inefficient to open the files one by one and check in practice. Another...
Can encryption algorithms like 3DES or RSA be implemented for optical networks in MATLAB? I know that the implementation of these in optics have been studied. But I am not sure what software they would have used. Can I use MATLAB for the same? Any resource on how to do this would be greatly...
anyone help me to convert this sample code of Gaussian Cone shape of random number code in Matlab into C++
function GaussianCone
clear all; clc;
mx=10000; my=mx; mz=mx;
z=[1:1:mz]';
sigma=0.01; R=0.5; mu=0;
sigmax=sigma+R*z;
sigmay=sigma+R*z;
x=zeros(mx,1)...
I have no idea what I am doing wrong. I have already found multiple places on the internet which give clear examples of how to do this, yet I am still struggling. Please help me out, or at least point me somewhere. My code is below. I am trying to interpolate pixels of a full color image. The...
Homework Statement
The volume V of a liquid in a partially filled ellipsoid shaped tank is given by
V = (pi/3)*(3*a-h)*(((b^2)*(h^2))/(a^2))
Develop an M-file to create a plot of volume versus depth. Here are the first few lines:
function myellipsoid(a,b,plot_title)
% Volume of horizontal...
When I write 1.516*10^-5 in Matlab it gives 1.516000000000000e-05 but I do not want to use e symbol. So which format should I use. I could use format bank but it has only two digits. I need more digits. Would you like to help me.
Thank you.
Can we use Greek symbols on Matlab workspace? If so, how can we use them?
I have made a search, most of the replies on the net was that Greek symbols cannot be used on workspace.
Thank you.
Hi, When I using Matlab 2008, the symbols and numbers were big enough to see but now I use Matlab 2013 but symbols and numbers or what I write is too little. How can I make them bigger?
Thank you.
Homework Statement
I'm a little lost on how to plot this data and function. I included the homework question and my attempt at plotting in the attached picture. I'm pretty sure what I have is completely wrong and I honestly don't have much of an understanding of matlab, so the more you dumb it...
Hello everyone
help please
I need to fit experimental data with a theoretical model using the MATLAB software what is the best way to do it?
thx for advance
hi all...am trying to generate sinusoidal pulse width modulation using arduino-simulink for my inverter board...I simulated the SPWM logic in simulink, then installed the required support package for arduino-simulink...but i am facing some problems...I started from basic...like linking arduino...
Let A be a random n×n matrix, x = (1,1,...,1)⊤ be an n-vector of ones and b = Ax be the right-hand side vector. As in class, let z = (zj) ∈ Rn be the result of solving the system Ax = b in finite precision using the backslash command. To measure the error between x and z, we let
δ= max |xj−zj|...
I have the code which solves the Sel'kov reaction-diffusion in MATLAB with a Crank-Nicholson scheme.
I would love to modify or write a 2D Crank-Nicolson scheme which solves the equations:
##u_t = D_u(u_{xx}+u_{yy})-u+a*v+u^2*v##
##v_y = D_v(v_{xx}+v_{yy}) +b-av-u^2v##
Where ##D_u, D_v## are...
I'm trying to numerically solve the time dependent Schrödinger equation and I've been told that the best approach is to numerically integrate using a finite difference method, however I don't understand why I couldn't just use ode45 to solve it?! Is the finite difference (interpolation) method...
Homework Statement
Hi all, attempting to make a Method of Characteristics solver in Matlab. I'm particularly hoping that there are some computational nuclear engineering guys about who might have a bit of experience programming a simple version of one of these.
I'm trying to create the solver...
I used a function called ind2patch to make a big 3D block which contains a number of smaller blocks in 3 dimensions. Each small block has a value which the magnitude is represented by a color.One example is shown below:
However, most of the boxes have very low or zero value and I don't need to...
Hi all,
i need help solving the following integral using Matlab:
* tetam is a parameter and the integration is by alpha.
the answer should be function of tetam
* K33, K11 are constantsThanks ,
Chen
Homework Statement
I'm trying to calculate the Fourier Series for a periodic signal defined as:
y = x 0<x<2Π
y = 0 2Π≤x<3Π
Homework Equations
Fn = 1/T ∫T f(t)cos(kwοt + θk)[/B]
cn/2 + ∑k=1k=∞(cn)cos(kwοt+θk)
cn= 2|Fn|
θk=∠Fn
The Attempt at a Solution
I got Cn =...
I'm trying to generate contours that plot with the animation using contour(X,Y) but it's not quite working. I only need it to be in the x-y plane at 0km depth (see picture for greater clarification)
% A script to plot two 3D waves.
clear
%Define the total time for simulation
T_total=10;
%Set...
I have an integration that doesn't have a solution in the table of integrals. So, I evaluated it using Mathematica using the command NIntegrate. However, when I compare the result with Monte-Carlo simulations, there is a very small constant gap between the two curves. Is it because of the...
I want to write a Matlab code which removes all frequency components from a .wav sound file except those within ##±25 Hz## of ##523 Hz## as well as its harmonics (up to the Nyquist frequency). I want to do this without using any built in filters.
Here is my code so far:
[s, Fs] =...
Mod note: Moved from a technical forum section, so missing the homework template
I want to write code for this double sum in MATLAB and I have written following code:
x = 100; % to calculate omega and u
l = 300; % to calculate omega
p = 10;
omegaa= x/l; deltaH = 200;
deltat =...
Hello Everybody,
I'm new to this interesting forum and this is my first post :)
So i wonder if can i use a Trial version of Matlab to perform some simulation for my Phd. Is the Trial version allow doing some important tests ?
Thank you for your answer
Here is a link the code which I am trying to modify. It is the radial average of a matrix function.
http://uk.mathworks.com/matlabcentral/fileexchange/46468-radialavg-zip/content/radialavg.m
I want to restrict the function to only look within certain angles, e.g. 15 degrees either side of the...
Hi, I am a novice at MATLAB and just started using it. I need some help with it. I want to post process an array of time domain signals using a specific algorithm. These time domain signals are acquired using labview and I want to post process them using matlab. I have the equation for post...
Hi. I have this code in matlab:
/ /
I=dlmread('C:\Users\rshah\Desktop\Polymer Project\monteCarloCode\E=1e8.txt');
F=fft2(I); F = fftshift(F); % Center FFT
F = abs(F); % Get the magnitude since F is complex
F = log(F+1); % Use log, for perceptual scaling, and +1 since log(0) is undefined...
water moves over a stationary horizontal flat plate of one-meter length. if velocity of water is 1 m/s, draw boundary layer and friction coefficient versus x for this plate.
hint: start your curves from x=1cm.Professor asked us to do it in Matlab or Excel and I'm not sure I understand how to...
Homework Statement
I have made a plot of a given .wav file in Matlab. The problem asks: find the fundamental frequencies of the 3 vibrating strings, and identify some of their harmonics.
Homework Equations
3. The Attempt at a Solution [/B]
So I made a Matlab plot of the power spectrum over...
In post #5 of this thread, Jedishrfu commented that Freemat is a cheap and free alternative to Matlab. My question is how close an alternative is it. I need to learn python and MATLAB for my upcoming entry into a grad program this fall. Python is free, of course, but should I buy the actual...