Category "matlab"

Earthquake simulation - finite elements method (Matlab)

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

hydrological model of a river basin, forecasting precipitation cumulative 5 days inflow [closed]

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

Simplification code to avoid if else division problem

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

Matlab resample array based on second array

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

MATLAB resolution of a 6-th order non-linear differential equation [stiffness]

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

Matrix index out of range during loop

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) =

Separate initialization and display of plot

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.)

My for loop won't output anything (Matlab)

I'm trying to get this for loop to work on Matlab so I can plot these three histograms. I'm guessing it won't output because it says that my variables such as a

Error finding the simplest row form of a matrix

This problem was discovered when I was solving this second order differential equation by matlab syms x(t) diff(x,t,2)+k*diff(x,t)+b*x==0 I transform i

Webread Http Return header

I am using webread to read data from Azure Table Storage. If the queried data is above 1K rows, there are specific keys returned in the header when you preform

subprocess.run produces different result if launched from Python, versus Matlab

I have a Python 3 class that creates input to send to a fortran program (xfoil). I am using subprocess.run to launch the fortran binary and send the command inp

Dynamically addressing MATLAB modules without using eval/feval

Consider a codebase with this file structure: myScript.m (Script) +modA/ fn.m (Function) +modB/ fn.m (Function) myScript.m must choose which of modA.

How can I extract state space (i.e., A, B, C, D) from these equations in Matlab?

I have two equations that have interaction together. How can I extract state space (i.e., A, B, C, D) from these equations in Matlab?

For loop through different excel files AND different worksheets (Matlab)

I try to loop not only through different excel sheets(~125), but also through different excel files (~12). I managed to write a code for the sheets, but now I

Every time I train my CNN on matlab, is it remembering the old weights from the previous time I trained it? Or does it reset them?

So for example, I have trained a CNN on my data using a learning rate of 0.0003 and 10 epochs, with a minibatch size of 32. After training it, lets say I get an

Matlab System Function and Terminal Runs differently

I have a python code that I want to run in Matlab. It has an `import NumPy statement in it. The code runs without a problem in the terminal. But when I use Matl

How to filter similar line with similar angle and distance?

I have to filter similar line with similar theta difference < pi/180*4 and rho difference < 4. My code and test code are as follows, but function is too l

How to get all possible combinations of array elements without duplicate

I have a vector of string elements vector = {'A','B','C'}. I want to generate all possible combination of the three elements of the array but without duplicate.

How to improve speed simulation results with ODE45/23/23s/15s

I want to simulate an ODE system, very fast. I usually use Euler-Method because it's fast, but not the most stable nor accurate. But I want to use a more standa

Why does the freezeWeights fucntion not work for me in MatLab?

I am following the mathswork tutorial for transfer learning on the GoogLenet, and when it comes to the freezeWeights function, it just doesn't work for me, and