Risposto
Script to load .mat file from a path, calculate a value based on a formula, loop the same until the last file of the folder (could be 1000s) and add the calc'd values in one.
This is a sample script which will help you accomplish what you need: % Specify the folder containing the .mat files folder =...

circa un anno fa | 0

Risposto
Extracting a specific row from two different variables
You can use MATLAB's logical indexing feature. Here is an example of how you can do this: Assuming your data is stored in two a...

circa un anno fa | 0

Risposto
Feature selection in sequence to one regression
In the case of a sequence-to-one regression problem, where you have multiple time-series features and a single-valued target var...

circa un anno fa | 0

| accettato

Risposto
Not able to run the app designer code.
The error you are encountering is because the registerApp method in your today4 class has different access permissions than the ...

circa un anno fa | 0

Risposto
Calling Python modules in MATLAB function Simulink Block
The issue you are encountering is due to the way MATLAB handles Python function calls in the Simulink environment. In MATLAB scr...

circa un anno fa | 0

Risposto
General code for chebyshev pseudo spectral method
The pseudo-spectral collocation method is a numerical method for solving differential equations using the spectral representatio...

circa un anno fa | 2

| accettato

Risposto
How to insert cell array into first row of excel worksheet using worksheet and workbook properties (dot notation)?
You can add a row to the newly created worksheet using worksheet and workbook object properties in MATLAB. This is an example of...

circa un anno fa | 0

| accettato

Risposto
Write values of large cell to .inp file
A combination of fprintf and loops can be used to write the values of the doubles in your cell array to a text file. A sample co...

circa un anno fa | 0

Risposto
create a parquet file with struct inside it
Parquet is a columnar storage format that is optimized for reading and writing large amounts of structured data efficiently. Whi...

circa un anno fa | 0

Risposto
A script to append a column with values and read multiple txt files from different folders
This is an example MATLAB code that should accomplish what you described: % Define the names of the folders containing the text...

circa un anno fa | 0

Risposto
how can i form a ZCT matrix of 64*64.
The ZCT pattern is a matrix of -1's and 1's that is repeated in a checkerboard pattern across the matrix. This is an example co...

circa un anno fa | 0

Risposto
how to call a script file in simulink?
The MATLAB Answer found here lists the steps to call a MATLAB script file from Simulink.

circa un anno fa | 0

Risposto
how can i get 6 gaussian distribution?
To draw a histogram of six Gaussian distributions with six local max values as the average value, we can use the histogram funct...

circa un anno fa | 0

Risposto
Extract column from text file
To extract the first number between the brackets in the data provided, we can use regular expressions in MATLAB. This regular e...

circa un anno fa | 0

Risposto
How to add script to testing environment
Yes, it is possible to call a MATLAB script or function in Simulink Test. You can use the MATLAB Function block or the MATLAB Sy...

circa un anno fa | 0

Risposto
Find distance of two points inside a matrix
The interp2 function in MATLAB to interpolate the depths between two points on a grid of longitudes and latitudes. I will show a...

circa un anno fa | 0

| accettato

Risposto
Exporting excell from matlab
To export a cell array as an Excel file from MATLAB, we can use the writetable function. This is an example which demonstrates h...

circa un anno fa | 0

| accettato

Risposto
change matlab linear index to numpy.
This can be the equivalent NumPy code for the given MATLAB code: import numpy as np X = np.random.rand(16, 10, 1200) My = np....

circa un anno fa | 0

Risposto
Can you please help me ?
The following code plots the functions pointed by you: % Define the ramp function r(t) r = @(t) t .* (t >= 0); % Define th...

circa un anno fa | 0

Risposto
Continuous-Time Signal Plotting
The following MATLAB code will plot the three functions pointed by you: % Define the ramp function r(t) r = @(t) t.*(t >= 0);...

circa un anno fa | 0

Risposto
find center of matrix
To find a mini square exactly at the center of a 100x120 matrix in MATLAB, we can follow the following steps: Calculate the cen...

circa un anno fa | 1

Risposto
How to train data in SVM?
In general, it is a good practice to normalize your data before training a machine learning model. Normalizing the data ensures ...

circa un anno fa | 0

Risposto
How to compare two xcel worksheets?
To compare two Excel worksheets in MATLAB, we can use the readtable function to read each worksheet into a table, and then use t...

circa un anno fa | 0

Risposto
Quistion 1: Write a MATLAB program (Script file) Q1_my_average that takes a vector (an array) of values and returns the sum and product of this vector, you need to use two way in solving this question, one of them is using built in function.
This is a MATLAB program called my_average that takes a vector of values as input and returns the sum and product of the vector:...

circa un anno fa | 0

Risposto
nntool traing parametrs meaning?
Effective R2022a, the nntool has been removed and replaced with nnstart.

circa un anno fa | 0

Risposto
Write MATLAB code for height of projectile and range of projectile
We can write MATLAB code to calculate the height and range of the projectile for a range of launch angles, and then plot a graph...

circa un anno fa | 0

Risposto
How can i calculate memory cost of my program?
To compute the memory cost of a MATLAB program, we can use the whos function to display information about the variables in the M...

circa un anno fa | 0

| accettato

Risposto
how do i plot the following signal in matlab? x(n)=4u(n)-u(n-1)-u(n-2)-2u(n-3)
To plot the signal x(n) = 4u(n) - u(n-1) - u(n-2) - 2u(n-3) in MATLAB, we can first define the signal as a function of n, and th...

circa un anno fa | 0

Risposto
how to import.csv file in sptool
To import a data file in CSV format into sptool in MATLAB, you can use the readtable function to read the CSV file into a table....

circa un anno fa | 0

Risposto
Gauss-Seidel for solving linear equations
To solve the system of linear equations using the Gauss-Seidel iterative method in MATLAB, we can apply the iteration formula fo...

circa un anno fa | 0

Carica altro