Matlab Definition and 1000 Threads
-
MATLAB Problem with Runge-Kutta script file
Hello : trying to run mutiple script files on matlab (matlab basic online) but it is giving an error message the files are about runge - kutta method and applying them on a ODEs the 1 script file Lornz : function dy = Lornz(t,y,sigma,beta,rho) % y is the 3 dimentional state vector % y(1)...- hagopbul
- Thread
- Matlab Matlab code Runge kutta
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
Modeling Air Compression Cylinder
Hi, I'm have been trying to model an airsoft replica, as an electrical engineer fluid dynamics, thermodynamics is a complete new flied for me and with with help of Ai i have been learning a lot about this subject. So far I have come a long way in making something my first model sort of worked...- JeroenM
- Thread
- Cfd Fluid dynamics Matlab Modelling Thermodynamcics
- Replies: 45
- Forum: Mechanical Engineering
-
What Software To Use For Using Pole Placement To Determine PID Gains?
Hello I'm trying to model a controls system. The issue I'm having is that the equation of motion and taking the Laplace transform and obtaining the transfer function is computationally difficult. I'm new to this so I don't know which software tools to use. I've heard about Matlab and python. I...- Pipsqueakalchemist
- Thread
- Computation Control systems Matlab Software Transfer function
- Replies: 1
- Forum: Mechanical Engineering
-
Y
Plotting polarization of EM waves in Matlab
Hello , there is a polarization matix I want to implement in matlab. I have build a basic matlab plot which could visualize EM waves in 3D. The basic equations described in equation 2.5.1 from the attached link. given the simple case of linear polarization, What is the strategy of plotting...- yefj
- Thread
- Em wave Matlab Polarization
- Replies: 1
- Forum: Advanced Physics Homework Help
-
MATLAB Unable to produce desired results using state-space model with observer for inverted pendulum
Hello everyone, I am trying to make a state-space observer of inverted pendulum using this code : and I connect it to this model : but somehow I am only able to produce this result : Do you know what is actually wrong with my code?? any response and help is really appreciated..thanks before- e0ne199
- Thread
- Gain Matlab Observer State space
- Replies: 0
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Asking about Chatgpt and Proprietary Software
Hello all: i was reviewing matlab related book few days ago , and used Chatgpt to explain a code which was mentioned in the book , chatgpt explained it , but i felt that it assumed that i am sharing the code with it , not posting it for the program to read it and generate an explanation , which...- hagopbul
- Thread
- Ai chatgpt Matlab
- Replies: 3
- Forum: General Discussion
-
Thermoelasticity problem with FEM in MATLAB
Hello I want to find distribution of temperature, and stress in cylinder with inner and outer temperature and pressure , I used linear elements with 3 nodes and wrote matlab code, moreover I want to solve that coupled but I have problem in first and last point because those have something like...- Chakad
- Thread
- Cylinder Finite element method Matlab Stress analysis Thermocouple
- Replies: 2
- Forum: Mechanical Engineering
-
Engineering How Can MATLAB Be Used to Analyze Signal Duration and Frequencies Using DFT?
Good morning, I have an exercise with two points that gives a Matlab mat file in which are contained the samples of two measured signals and the variable fs indicating the sampling frequency A)Signal 1 consists of two sinusoidal signals of which you are asked to calculate: -the duration ⇒ I...- marco02
- Thread
- Dft Exercise Matlab
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
P
MATLAB Animating Vector Addition in Matlab (Looking for improvements)
Here is my code thus far and it seems to work (I've attached a gif as well so hopefully that works) va1 = [50*cos(pi/3), 50*sin(pi/3)]; %Two different vectors both starting from the origin vb1 = [20*cos(pi/6), 20*sin(pi/6)]; iterator = linspace(1,100,100); %100 iterations for the animation...- PhDeezNutz
- Thread
- Animation Matlab Vector addition
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
How to fit the Fourier optical formula using matlab
Solved by matlab- xiaoxin8949
- Thread
- Matlab
- Replies: 1
- Forum: Introductory Physics Homework Help
-
M
MATLAB How do I write this chua oscillator to an audio file in matlab?
hello i would like to ask how to write the solution of this matlab program to an audio file using the audio tool box or any other technique. thanks very much. function chua_oscillator %This program is computed by S.Sabarathinam %Based on: Nonlinear Dynamics: Integrability, Chaos and Patterns,by...- matlab audio
- Thread
- Audio File Matlab
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
T
MATLAB Matlab's numeric solution to det of Matrix is incorrect
Hello everyone, I have an equation derived as the det of a matrix, which I have solved in Mathematica 11 with Findroot and verified with the respective PhD Thesis' data. However, I now try to get more accustomed to Matlab (R2017b) and hence I tried to reproduce the problem and find its solution...- Thanos_ST
- Thread
- Mathematica Matlab Numerical calculation
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
I need sources to learn about dynamic systems
Hi! I have exam in couple of weeks , and now am looking for sources to learn about dynamic systems , chaotic systems and etc. My main goal is to learn characteristics of such systems , learn about special points in dynamic plane. For the most part we used to create dynamic system simulations...- Ugnius
- Thread
- Complex analysis Dynamic dynamic systems Matlab Sources Systems
- Replies: 4
- Forum: STEM Academic Advising
-
MATLAB Streamline Symbolic Derivatives with MATLAB's Simplify Operation
I am using MATLAB to compute a few symbolic derivatives. The outputs are correct (I've checked a few of them) but usually long and never simplified (even when "obvious" simplifications are possible, i.e. combining terms, cancelling things). Is there a way to get MATLAB to simplify symbolic...- ergospherical
- Thread
- Matlab
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
Engineering How to implement a transfer function in Simulink with variable coefficients?
The implementations for the two filters in simulink are as follow: For the first filter: For the second one: The obtained results have values of 10^-12, while the expected results should be between 10^-3 - 10. Since it's the first time when I try t implement a tf with variable coefficients I...- MoonDiver
- Thread
- Coefficients Control Function Laplace transform Matlab Simulink Transfer function Variable
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB Help converting MATLAB to Scilab code
Hello, I am having difficulty converting some MATLAB code to Scilab code. Specifically, the problem is with graphing the results of a spiking neuron program. Herer is the program and the article that explains it: https://www.izhikevich.org/publications/spikes.pdf The problem I am having is...- DiracPool
- Thread
- Code Matlab
- Replies: 4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
V
Using Newton's Method to Solve and Using Fsolve in Matlab
Here is my code so far and solution. When using fsolve, we obtain the result that the equation does get solved. We find the values to be 1.0000, 0.0000, and 2.0000. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the...- ver_mathstats
- Thread
- Matlab Method Newton's method
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
V
Solving An IVP on Matlab with ODE 45 with different tolerances
My code is as follows: but when I use the function in my command window exactsol(t) and input a tolerance but there is an error in LINE 19 saying unrecognized ivpfun, could someone help me fix it as I am unsure of how to proceed from here. function y = exactsol(t) y = zeros (2,1); y(1) =...- ver_mathstats
- Thread
- Ivp Matlab Ode
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
V
Using ODE45 on Matlab to Integrate A Problem
I got the answer for this question but I was wondering about stepsize when it comes to a problem like this? Is there a way to change the step size? Would my step size change in line 20, or would it change in line 3? I tried changing line 3 to be t=0:100:17.1 but then I get a error message, so...- ver_mathstats
- Thread
- Integrate Matlab Ode45
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
S
Pendulum Question (Matlab Coursework)
Apologies for my lack of knowledge on the equations front, I have burnt by brain out on this and haven't the capacity to learn LaTex right now! So here's a screengrab of it: So, This is a Matlab coursework and I am struggling to work out how best to approach solving it. What I have so far is...- some bloke
- Thread
- Coursework Definite integrals Differentials Matlab Pendulum
- Replies: 4
- Forum: Introductory Physics Homework Help
-
V
Matlab Function for Composite Simpson
function I=main_simpson(a,b,tol) f = @(x) sin(1./x); SO = 0; N = 10; S = 1; while (abs(S-SO)>tol) SO = S; h = (b-a)/(2*N); i = 0:N-1; xi = a+2*i*h; xi1 = a+2*(i+0.5)*h; xi2 = a+2*(i+1)*h; S = (h/3)*sum(f(xi)+4*f(xi1)+f(xi2)); N = 2*N; end end <Moderator's note...- ver_mathstats
- Thread
- Composite Function Matlab
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
V
Why Doesn't My MATLAB While Loop Output the Expected Number?
I am confused why this is the case, why would it output that number? When I go through the code, there is (x+1)-1 which does equal 1, then x = 2*x is 2? So why is the output not 2? How should I proceed in coming up with a solution? Does this have something to do with cancellation errors somewhere?- ver_mathstats
- Thread
- Loop Matlab
- Replies: 5
- Forum: Engineering and Comp Sci Homework Help
-
V
Creating Plots using Matlab For Interpolation
My code in Matlab for this practice question is: ( x = linspace(0,4,10); y = sqrt(x); plot(x,y,'-o'); hold on y2=polyfit(x,y,2); plot(x,y2,'--or') ) Is this the best way to do? My plots look nearly identical and are on top of one another but a later question asks to graph the error, so I am...- ver_mathstats
- Thread
- Interpolation Matlab Plots
- Replies: 10
- Forum: Calculus and Beyond Homework Help
-
T
MATLAB FEM, Matlab and the modes of an element
Hello I wrote a Matlab code to form the 8 by 8 stiffness matrix of a single, 4-noded element, for a plane strain problem for an isotropic element. I conduct an eigenvalue analysis on this matrix Matlabe reports 5 non-zero eigenvalue modes, and 3 zero-eigenvalue modes (as expected) Of the 3...- Trying2Learn
- Thread
- Eigenvalues Element Fem Matlab Modes
- Replies: 32
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
V
Why Do MATLAB and My Calculator Show Different Results for g(x) and h(x)?
I am having a bit of trouble understanding what the values of g(x) and h(x) mean. I went through it by hand and here is information that I gathered about the values and questions I am trying to answer to gain a better understanding. Firstly, for the value of x=1e-10 both the numerator of g(x)...- ver_mathstats
- Thread
- Matlab Output
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
V
Creating a Double Precision Matlab Function from Scratch
I am confused at how to code this without using any of matlab's already built in functions except for using double. Is this question just asking me to write out the function and then make sure it's double precision?- ver_mathstats
- Thread
- Coding Function Matlab
- Replies: 10
- Forum: Engineering and Comp Sci Homework Help
-
MATLAB Curve Fitting in MATLAB: Error Diagnosis
I have two 1D matrices X(1,j) and Y(1,j) of equal length. To fit Y to a model asin(bx) I tried: fit = fittype(@(a,b,X), a*sin(b*X)); [fitted, gof] = fit(X, Y, fit) coefficients = coeffvalues(fitted) this gives the message: Error using fittype>iDeduceCoefficients The independent variable x does...- ergospherical
- Thread
- Curve Curve fitting Fitting Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB Can I run sections of code independently in Python and C++ like in MATLAB?
Hi PF! I typically code in MATLAB. Here, if I run the following program %% Section 1 x = 5; y = 2; %% Section 2 z = x + y; everything works. But now let's say I wanted to change line 5 to z = x - y. In MATLAB this is simple: I can simply change line 5 and rerun section 2. Is there a way to...- member 428835
- Thread
- C++ Matlab Python
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Closed form not the same as the discrete form
clear; lambda = 3e-2; x = 4 * pi/lambda * linspace(eps, 15, 100000); T = 5e-3; t = [0:0.001e-3:T] ; % 0.1:1e-3:0.1+T]; u = 3; a = 4*pi/lambda * u; for i = 1:length(x) Z(i) = sum(-((cos(a.*t) - cos(x(i).*t)).^2 + (sin(a.*t) - sin(x(i).*t)).^2)); end % Z1 = csc((a+x)/2) .*...- tworitdash
- Thread
- Closed Closed-form solution Discrete Form Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
P
MATLAB Phasor diagram - how to check angle in matlab?
I have a problem with checking angle in phasor diagram. I print my phasor diagram and I don't know how to check angle in window. Have somebody any idea how to search that? Maybe it is not possible and I need to add function in my MATLAB code to get result.- polibuda
- Thread
- Angle Diagram Matlab Phasor Phasor diagram
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
M
MATLAB How to load data from the example supplied on MATLAB website?
The demo here doesn't specify how to download the file dowPortfolio.xlsx from the first line in the tutorial: T = readtable('dowPortfolio.xlsx'); Any help here (please tell me it's not just me)? Nevermind, evidently you literally can just copy that line into the command window and MATLAB...- member 428835
- Thread
- Data Example Load Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB How to plot flow data from an orifice in MATLAB without overlapping the plots?
I am studying a flow going through an orifice. I am aimed at overlapping the plots for the speed distribution over the vertical width profile (which is 0.015 m long; highlighted in red) for two downstream, horizontal distances [w.r.t. the orifice]: 0.01 m and 0.03 m. The result should look...- JD_PM
- Thread
- Data Matlab Plot
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
W
Solving Freidman Equation on MATLAB
I have to use MATLAB to solve the Freidman Equation and I have barely any computer programming language skills whatsoever. Is there anyone that can please help me solve the equation using MATLAB. I desperately need help in this area because my Professor won't show me how like he expects me to...- WoC1994
- Thread
- Matlab
- Replies: 1
- Forum: Advanced Physics Homework Help
-
S
Interested in Renewable Energy and Numerical Analysis? Join our Forum Community!
Hello ! My name is Amine, Renewable Energies Student (Thermal Conversion Masters degree) . interested in numerical analysis and applied mathematics . Currently focusing on Heat and Mass Transfer , Fluid Mechanics and Matlab programming. ready to efficiently help on those subjects please...- sku
- Thread
- Fluid machanics Heat transfer Matlab Numerical analysis
- Replies: 1
- Forum: New Member Introductions
-
Extraction Flash Calculation - 4 Component and 2 Phase System
I am performing extraction flash calculations for 4 component and 2 phase system. For anyone somewhat shaky with what extraction flash calculation is; extraction is performed, feed composition is known and we are calculating compositions of both phases at equilibrium, mole fraction of every...- Dario56
- Thread
- Calculation Component Equilibrium Extraction Flash Matlab Phase System
- Replies: 2
- Forum: Materials and Chemical Engineering
-
H
MATLAB Modelling a Heat Pump with Linear Compressor using MATLAB Simulink
Hello, I am a final year mechanical engineering student designing a heat pump with a linear compressor for an electric vehicle and have decided to model this using Simulink, I would love some help on the governing equations/formulas needed for each component of the heat pump as well as guidance...- hazycam
- Thread
- Compressor Heat Heat pump Linear Matlab Modelling Pump Simulink
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Learning Curve of Wolfram Alpha or Matlab
I should probably get one or two of these under my belt. My current need is to plot a ... I guess it's a heat map. I've got a map of my local area and I want to determine the geographical centre of a number of points (say, seven). So, for every xy "cell" on the map, I'll use pythagoras to...- DaveC426913
- Thread
- Alpha Curve Matlab Wolfram alpha
- Replies: 17
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
Populating a 1001x101 2D array in MATLAB
The method I employed was based on a nested loop. I ran into two issues with this approach 1. The code took way too long to run, easily going for over 7 minutes. 2. In the end, it didn't even completely work, due to the "index exceeding the array length". This confuses me For the relevant...- Sai Maurice
- Thread
- 2d Array Material science Matlab Thermodynamics
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
P
MATLAB Using 2 MATLAB files to simulate 3 plots
First of all, I'm an absolute beginner in MATLAB. Secondly, I have 2 MATLAB files, one entitled as a "main file" and the other one as a helping .m file, which is called by the main file. I need to run the main file in order to obtain 3 plots. What is the exact procedure that I should follow in...- PhysicsTruth
- Thread
- files Matlab Matlab code Plots
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
A
MATLAB Help with Math: Calculate Manually, No MATLAB Needed
Can someone help me with this? You don't need to do MATLAB, just compute manually.- ann777
- Thread
- Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
R
MATLAB Learn MATLAB Commands: Website for Variable and Function Explanation
when I had learned matlab, my professor told me a website where everything is explained about MATLAB variable and MATLAB function. After a long time later, I like to use MATLAB for my work. However, I forget the name of the website. Does anybody tell me the helpful website?- robax25
- Thread
- Explanation Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
J
MATLAB Conversion from Mathematica to Matlab
Hello!. I am new to the forum and I am also a newbie to programming. I want to convert a Mathematica code to Matlab, but I don't understand how to translate these lines. This code is Mathematica 5.0. defvar := Module[{a}, Clear[ cN, cNf, ginix ]; Clear[ Nh, Nhf, gini ]; cN =...- Juan Angel
- Thread
- Mathematica Matlab Unit conversion
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Optimizing Memory Usage in Matlab: Tips and Techniques
Hi. I am using Matlab to solve ODEs. I use ode45 in a for loop since solving the ODEs in a single ode45 function yielding an error of "out of memory". However, after the loop has run many times for several hours, the memory will still be full and the program will become slower and slower. If I...- Haorong Wu
- Thread
- Matlab Memory
- Replies: 9
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
F
Problem calculating eigenvalues and eigenvectors
Hello everyone. I am trying to construct a functioning version of randomfields (specifically 2D_karhunen_loeve_identification_example.py) in Matlab. For that, I have to calculate the Karhunen-Loève expansion of 2D data, since this is what it says in the documentation. I also have some sample...- Frank Einstein
- Thread
- Covariance Eigenvalues Eigenvectors Error Matlab
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Change the value of a variable at each time step in matlab?
hi guys I am trying to implement the a second order differential equation tat contains a time dependent term, the equation looks something like r'' = -\mu/r^3+(g/g^3-m/m^3) the idea is that i want to calculate 'r' the position vector of a point, that is dependent on vectors g and m, I tired to...- patric44
- Thread
- Change Matlab Ode45 Time Value Variable
- Replies: 8
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Transforming long symbolic expressions to use in matlab ode45?
hi guys i build a little function that outputs a symbolic expression like that below, this is only a part of it: (105*(x(5)^2/r^2 - 1)^2)/8 + (210*x(5)^2*(x(5)^2/r^2 - 1))/r^2))/(r^2)^(9/2) + (8*R^7*u*x(5) the problem is the only way to integrate this output is to expand the function externally...- patric44
- Thread
- Expressions Matlab Ode45
- Replies: 10
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB Graphene band structure Matlab code
I have this code for 3D band structure of graphene but i can't understand why while graphene first brillouin zone is hexagonal but here a rectangle form of first brillouin zone is used?E0 = 0; % coloumb integral V = -2.7; % hopping integral [eV] acc = 1.41; % c-c bond length [Angstrom] lattice =...- Mohammad-gl
- Thread
- Band Band structure Code Graphene Matlab Matlab code Structure
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
MATLAB MATLAB IFFT doesn't match the analytical one
I have a Gaussian shape frequency domain spectrum of which I am calculating the Inverse Fourier transform. I use both IFFT of MATLAB and also an analytical expression of Mathematica. They are not the same. I don't know where it is wrong. I have pasted both the figures. The numerical one has...- tworitdash
- Thread
- Analytical Match Matlab
- Replies: 10
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
I
ODE solver for second Order ODE with Stiffness and Mass Matrices
i am new to MATLAB and and as shown below I have a second order differential equation M*u''+K*u=F(t) where M is the mass matrix and K is the stifness matrix and u is the displacement. and i have to write a code for MATLAB using ODE45 to get a solution for u. there was not so much information on...- ihebmtir
- Thread
- Mass Matlab Matrices Ode Ode45 Second order Second order ode Stiffness
- Replies: 3
- Forum: Mechanical Engineering
-
F
MATLAB Can I calculate the covariance matrix of a large set of data?
Hello everyone. I want to calculate the covariance matrix of a stochastic process using Matlab as cov(listOfUVValues) being the dimensions of listOfUVValues 211302*50. I get the following error: Requested 211302x211302 (332.7GB) array exceeds maximum array size preference. Creation of...- Frank Einstein
- Thread
- Covariance Covariance matrix Data Dimension Error Matlab Matrix Set
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX