Category "matlab"

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

MATLAB: How to convert data from an excel file (several sheets) to a matrix?

I try to process data from an excel file from several sheets (~200). Luckily the data is always at the same position in each sheet. I wrote the following code f

Ideas for extracting a portion of a wav file and saving as new wav file in MATLAB

This may be easy but I'm no expert in MatLab. I have a bacth of wav files and I need to extract a 30s sample from each. Example: 1.wav - need 1:34-2:04 2.wav -

Programmatic setting of Argument attribute for parameter in Simulink model workspace

I am using some Matlab m scripts to batch-process a set of Simulink models to produce Autosar software components using Embedded-Coder. I want some of the comp

computing LU factrs of a matrix using partial pivoting and assuming that A is invertible

I am writting a program in MATLAB. It needs to computer LU factors of a matrix using partial pivoting and assuming that A is invertible. I input a square matrix

GPR model with positive/negative sampling points becomes uniformly positive for large length scales

First, some context: For my current project, I am trying to construct a response surface/scalar function of two variables f(x,y) in order to determine an implic

Error plotting symbolic variable in MATLAB?

I am trying to learn fourier transform from book"signals and systems laboratory with matlab alex palamides" On page 312, following code is given which demonstra

how to create a 3D matrix in a loop , where in each loop the matrix size might change?

i wrote this code where i have array of matrics(alpha_mom_DR_data_array), and in this array , there are matrics in different sizes , for each one i want to calc

Axially loaded stepped shaft analysis in MATLAB

I have a stepped shaft as per the attached image. Following information available as an input parameters: Young's modulus 123e3N/mm^2. Cross-sectional area 300m

How to create MATLAB code for making bilinear coon's surface patch from cubic Bezier curves

I have following data from which I need to create coon's patch. Matrix of polygon vertices given below: P0u = \[0,0,0; 0.2357,0.2357,0.3333; 1.1785,0.2357,0.333

I want to convert a string containing letters to a double in matlab [closed]

East_Seed_1="MIA"; East_Seed_8="ATL"; for i=1:7 s=rand; if s<MIA_prob_vs_ATL s=1; I want to create an algorithm that, gi