Category "matlab"

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

Freeing up memory from Matlab's Map

I've got a problem which requires me to keep track of a large amount of data in a hard to predict way. I do know a few rules however that allow me to determine

translated the SNR calculation from MATLAB into the syntax of python

this is the MATLAB code which I would like to translate in Python. function [SNR] = bvpsnr(BVP, FS, HR, PlotTF) HR_F=HR/60; NyquistF = FS/2; FResBPM = 0.5; %res

Convert Matlab script to Python

I am trying to convert a script from the OCamCalib Matlab toolbox to python. This scripts estimate a inverse polynomial function used for the reverse path of li

Error in converting Matlab code to R code using tidyverse and matconv

I am using a piece of R code which was provided as a response to the previous question Using tidyverse and matconv to convert Matlab code to R code. The code su

what's shortcut key for switching current edited script to the last one?

when several scripts opened, I have to switch between the calling script and called script and Test script, what's the shortcut the switch the two script quickl

Matlab System Command Script stops

I am starting a python-script out of Matlab using the system()-command. I would to check in a while loop if the script is still running and do something else wh

Reading a system vairable from a blf file in Matlab

I have a dbc file and a blf file. There is a system variable stored in the blf file which I would like to read. But using canDatabase() and blfread() function,

Identifying weight matrix for MPC problem

I'm absolutely stuck in my programming exercise. I need to find a weight Matrix Q_weight which makes the objective feasible and has a low cost. I know that the

Mathematics Mod Function

I would love if someone can try to explain the difference between the two equations below and why they equal different values but from what i can see are the sa

MATLAB graph plot - coloring nodes smoothly by centrality

In MATLAB, I have a graph that I'd like to plot with its nodes colored according to measures of their centrality. Here's how I currently plot the graph: sdc = c

Nested MATLAB struct is difficult to parse when fetched in DataJoint Python

From DataJoint Python and DataJoint MATLAB, I have inserted the same values into a longblob attribute. From DataJoint Python it was inserted as a dictionary an