Category "matlab"

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

MatLab textscan(), from messy format with missing lines

I'm not familiar with MatLab textscan(). Any help you could provide would be much appreciated. The text file that I want to read looks as follows: test.0.xml my

How do I start counting when below a threshold and stop counting above the same threshold in a timeseries? [closed]

I modeled wind speed data for a whole year and now I want to count the amount of consecutive hours that the wind is below a certain threshold.

How can I cut a string in multiple .csv filenames while keeping the starting strings in Matlab?

This is the sample of the .csv files I have in a folder 84 files W17F07mylatest0_077004_20220214_122524_a W17F07mylatest0_077005_20220214_122530_a W17F07mylates

Efficient parallelization of two tasks

I have two tasks that take a fairly short time to compute (around half a second each). These two tasks (say A and B) are called repeatedly a large number of tim

Matlab paths and file handling with packages and class folders

So I have the following (simplified) project structure. scripts/ client.m src/ +estimators/ @estimator1/ 3party/ shel

Python subprocess line 1420 FileNotFoundError: [WinError 2] The system cannot find the file specified. Jupyter-Matlab notebook

I want to use Jupyter-matlab notebooks. I've downloaded Anaconda navigator and followed the steps from this web: http://jmlilly.net/jupyter-matlab Unfortunately

How to write a square function in Matlab?

I am trying to write a code in Matlab to generate a square function as shown in the attached figure. When I tried coding this in Matlab, I got a trapezoid funct

Concatenating the output of a for loop

Y= zeros(3, 354) for m = 1 : 118 R=GridData.R2(:,3*m-2:3*m); X=GridData.X2(:,3*m-2:3*m); B=GridData.B1(:,3*m-2:3*m); G=GridD