Category "matlab"

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

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