Category "matlab"

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

How to decompose a 9x9 matrix to 3x3 matrices?

I'm trying to decompose a 9x9 matrix into 9 3x3 matrices. I've already used the command reshape, but the matrices it returns are the ones as transforming the co

I think I'm expressing this summation incorrectly in MATLAB?

I'm trying to code the following sum (which is the solution for a functional DE): This sum is valid for t in [nT, (n+1)T], where T is a constant number (found

Activation function on the hidden layers for Regression models in neural networks

I am trying to predict a single output value,y, using two input features. I read that regression models usually don't use any activation function, and even when