Having trouble in using a random white noise in ode45 function handle input. I am using ode45 function to solve a 2 degree of freedom mechanical system (spring/
Is it possible in Matlab to create function handle that will take as input another function handle and how? e.g. I have h = @(x) x^2 I want to have h as paramet
Recently I am working on boosting Matlab project performances. As you may know, Matlab 2017 introduced a new C++ Mex function to avoid unnecessary data copies,
I am trying to implement code for this loss function for a classification task for a subset image data using several pre-trained models provided by MatConvNet b
I am building a MATLAB script to add two markers for a single label similar to below in Python. How to create two legend objects for a single plot instance? and
For the audio file found here, I am using the ssqueezepy library in Python to generate the cwt of the signal. Here is my Python code: import librosa import lib
I have a bunch of data which are distributed as a pdf function. When I plot the histogram histogram(mydata, nbin, "Normalization", 'pdf') the y-axis has a scale
I am currently working on an engineering project and have to use complex numbers. I want to take the complex numbers, plot the real and imaginary parts of them,
function [V,H] = Arnoldi(A,v,m) [n,~] = size(A); V = zeros(n,m+1); H = zeros(n,n); V(:,1) = v/norm(v); for k = 2:m V(:,k) = A*V(:,k-1); for j = 1:(k-
I am trying to write a custom chart (or graphical object, rather), and I would like to plot several of them in a single figure. I am following this guide, but I
I want to build a loop in Matlab where 'i' is the iteration variable and for each 'i' an n*n matrix will be the outcome. my question is how can I tell the progr
I'm trying to write a function that sums a bunch of functions and I have no idea what I'm doing wrong. My code: function [f_max,x_max] = ftot(l,a,E,J,F) % a and
I am attempting to plot an elliptical orbit based on a 2-D position array, beginning at p= [5 0]. The plot charts positions from a timeframe t, here between 0 a
do you know is there's a way to simulate a earthquake with the finite elements method using the Partial Differential Equation Toolbox on Matlab ? My goal is to
Hi guys we are trying to find the best proper model to forecast 5 days inflow cumulative of a river basin. For hydropower puroposes and water
I would like to make an optimisation by avoiding to use theIf else i used this element because when E = 0in the logic of my probelm B = [0 0 0 0 0]. By consequ
Let's say I have two datasets, both consisting of an x and y array, e.g.: x_1 = [1 2 3 4 5 6 7 8 9 10]; y_1 = [8 12 20 3 4 9 10 55 3 2]; x_2 = [2 5 6 8 9]; y_2
I am currently trying to solve a non-linear differential equation of order 6 for a function F defined on : Or : With these following boundary conditions : An
a is an nxn matrix. I have this code: [m,n] = size(a); x = zeros(m,1); for j=1:1:n if(j==1) a(1,:) = []; else end disp(a); a(:,j) =
What is a proper way to separate the initialization and the display of plots in Matlab? (I mean plots in a wide sense here; could be plot, plot3, scatter etc.)