Question

Multiple y axes with multiple plots on single x axis

Dear all, I tried to plot three y-axis where each y-axis contains two lines. I used the approach described in this post: https:...

27 days ago | 1 answer | 0

Question

Locating point on x-axis where the slope is decreasing

Dear all, I used the following code to plot the angle over time: figure hold on grid on plot(Time, theta,'linewidth',1.5) ...

1 month ago | 2 answers | 0

Question

Rearrange data plot3 and combine data points

Dear all, The following piece of code creates a 3D plot. Normally I import the mass data from a .csv file, but for convenience ...

1 month ago | 1 answer | 0

Question

Surface plot using fitrpg

Dear all, I tried to make a surface plot of the gaussian process function with the following code: gprMdl = fitrgp(X,Y1,'Kerne...

6 months ago | 2 answers | 0

Question

Plot gaplotdistance in one plot for multiple runs of genetic algorithm

Dear all, With the code below I managed to run the genetic algorithm multiple times. gprMdl2 = fitrgp(X,Y1,'KernelFunction','s...

6 months ago | 1 answer | 0

Question

Index in position 2 exceeds array bounds using crossval

Dear all, I got the following error when using crossval. Error using crossval>evalFun (line 488) The function '@(Xtr,Ytr,Xte)...

6 months ago | 1 answer | 0

Question

Assign values of .mat files into matrix

Dear all, I have multiple .mat files (see attachment). I want to organize the MFR_mod variables within the those .mat files int...

6 months ago | 3 answers | 0

Question

Classify imported files from multiple folders into cell array

Dear all, I have multiple files located in multiple folders. De main folder I called 'test'. De main folder contains 6 subfolde...

6 months ago | 1 answer | 0

Question

How to use bayesian optimization?

Dear all, I am trying to find a good way to use bayesian optimization that will give me the optimal simulation parameters that ...

6 months ago | 1 answer | 0

Question

Points inside multiple polygon for contour

I made the following contourplot. Then, I plot discretized points over this plot. I wanted to find the (x,y) coordinates o...

7 months ago | 2 answers | 1

Answered

Velocity vector plot with empty cell array

Solved it myself with an if else statement, see code below. for i = 1:N_run for t = 1:length(col) if cellfun(@ise...

Velocity vector plot with empty cell array

Solved it myself with an if else statement, see code below. for i = 1:N_run for t = 1:length(col) if cellfun(@ise...

7 months ago | 0

| accepted

Question

Velocity vector plot with empty cell array

With the following code I made a velocity vector plot over time. %% Velocity vector plot close all x_cent = mean(X(1,1:2)...

7 months ago | 2 answers | 0

Question

Convert a non uniform cell array of cell arrays to matrix

I have the following code: %% Loading the data rhoPart = 2540; files = dir(fullfile(uigetdir,'\**\*.data*')); [~,Index] = ...

7 months ago | 1 answer | 0

Question

Devide cell array into unequal length cells based on file name

With the following code I imported all of the .data files. All .data files of simulation 1 are located in folder 1 and all .data...

7 months ago | 1 answer | 0

Question

Use inpolygon command for multiple polygon areas

Dear all, I have some difficulty with assigning points into multiple square polygons. I have data files containing (x,y,z) coor...

7 months ago | 2 answers | 0

Answered

Find value in another cell array based on condition

Here the code that was succesfull for me: for i = 1:N_run %Number of simulation runs, which is for me 81 simulations s...

Find value in another cell array based on condition

Here the code that was succesfull for me: for i = 1:N_run %Number of simulation runs, which is for me 81 simulations s...

7 months ago | 0

| accepted

Question

Find value in another cell array based on condition

I have a folder containing the following files: Every file has the same format, but for a different time step: First (header...

7 months ago | 1 answer | 0

Question

Error using brace indexing with function hypot

I have a number of data files where every data file is stored in a cell array. Thus, : datac.1 is stored in expData{1,1} at tim...

7 months ago | 1 answer | 0

Question

Indexing arrays of binned data

Dear all, I have a cell array expData of 2745x1 cell. For every cell in this cell array I define the same range (i.e. bins). Th...

7 months ago | 3 answers | 0

Question

Error using accumarray in for loop with cell array

I am having trouble with using accumarray in a for loop. Hers is my code so far: for i = 1:length(files) % Define the rang...

7 months ago | 0 answers | 0

Answered

Group discretized data and determine mean

I found the solution myself. Here is an example for a single data file: mean = accumarray(disc_x{1,1}(:,1), expData{1,1}(:,2),[...

Group discretized data and determine mean

I found the solution myself. Here is an example for a single data file: mean = accumarray(disc_x{1,1}(:,1), expData{1,1}(:,2),[...

7 months ago | 0

| accepted

Question

Group discretized data and determine mean

Dear all, With help of the community I discretized my data, x-coordinates of particles, into bins. For every bin I want to take...

7 months ago | 1 answer | 0

Question

Setup an optimization problem using Bayesian Optimization

Dear all, Problem:I try to find the optimal set of variables using Bayesian optimization. Before I go further into the depth,...

8 months ago | 1 answer | 0

Question

Import range of files based on file name

I have a folder containing around 300,000 files. I don't need to import all the files. Problem: How can I import a range of fi...

8 months ago | 1 answer | 0

Question

Import files based on file name

I have a folder containing around 300,000 files. I don't need to import all the files. Problem: How can I import the files base...

8 months ago | 1 answer | 0

Question

How to use gaussian process regression to find the optimal set of parameters?

In a physical experiment I measured some outcome A. Then I set up a simulation of the experiment where I vary two parameters B ...

8 months ago | 1 answer | 0

Question

Open multiple files from the same folder with fopen and textscan

In matlab I wrote the following code: fid = fopen('LedgeTest_muSP_0.20_muRP_0.20.data.852','r'); % Read all the data from the ...

8 months ago | 2 answers | 0

Question

Find corresponding values of discritized data after using splitapply

I have a 3384x5 array of which the first and last 20 rows are shown in the pictures below. With the help of Cris LaPierre I...

8 months ago | 1 answer | 0

Question

Find maximum value of array within specified range, consecutively

I have a 3384x5 array of which the first and last 20 rows are shown in the pictures below. Problem: I want to find the m...

8 months ago | 2 answers | 0