Project Leader at Product Testing department.

Mahle UK R&D Center for automotive engine plain bearings.

Answered

How to properly apply cellfun in this case - text spliting

<https://uk.mathworks.com/matlabcentral/profile/authors/3073010-rik-wisselink Rik Wisselink>, <https://uk.mathworks.com/matlabce...

How to properly apply cellfun in this case - text spliting

<https://uk.mathworks.com/matlabcentral/profile/authors/3073010-rik-wisselink Rik Wisselink>, <https://uk.mathworks.com/matlabce...

environ un an ago | 0

Question

How to properly apply cellfun in this case - text spliting

I've got a table like this and my task is to separate the parameter name from a value: t = 10×1 table ...

environ un an ago | 3 answers | 0

Answered

Error using figure: First argument must be a figure object or a positive Integer

The doc says the input argument must be of double type: <</matlabcentral/answers/uploaded_files/128021/Capture.PNG>>

Error using figure: First argument must be a figure object or a positive Integer

The doc says the input argument must be of double type: <</matlabcentral/answers/uploaded_files/128021/Capture.PNG>>

plus d'un an ago | 0

| accepted

Answered

How do I plot a multivariate distribution?

Consider the following example: NoOfPoints = 1000; % Generate 'x' and 'y' x = rand(NoOfPoints,1); y ...

How do I plot a multivariate distribution?

Consider the following example: NoOfPoints = 1000; % Generate 'x' and 'y' x = rand(NoOfPoints,1); y ...

plus d'un an ago | 0

| accepted

Question

How to use 'setvartype' to get the variable as 'datetime' formatted as: yyyy-MM-dd

I've got a spreadsheet which gets imported into Matlab via *readtable()*. Prior to importing I use *detectImportOptions()* an...

plus d'un an ago | 2 answers | 0

Answered

How to generate a sine signal in which initially frequency increases linearly, then remains constant for some time and again decreases linearly.

Would it look like this: <</matlabcentral/answers/uploaded_files/126310/untitled.jpg>> % y = sine(2*pi*f*t) t...

How to generate a sine signal in which initially frequency increases linearly, then remains constant for some time and again decreases linearly.

Would it look like this: <</matlabcentral/answers/uploaded_files/126310/untitled.jpg>> % y = sine(2*pi*f*t) t...

plus d'un an ago | 0

| accepted

Answered

Plotting multiple trajectories on map

This is roughly how I would go about this problem [code untested]: % Get all the file names in the folder filename = dir...

Plotting multiple trajectories on map

This is roughly how I would go about this problem [code untested]: % Get all the file names in the folder filename = dir...

plus d'un an ago | 0

| accepted

Answered

Why is the correlation matrix much larger than the original matrix?

Have you checked the documentation for the corrcoef function? It explains exactly how the results are obtained: * <https://uk...

Why is the correlation matrix much larger than the original matrix?

Have you checked the documentation for the corrcoef function? It explains exactly how the results are obtained: * <https://uk...

plus d'un an ago | 1

| accepted

Answered

Plotting very small values using bar command

If you have a mix of relatively high and low values, you might want to consider using the logarithmic scale for the y-axis, i.e....

Plotting very small values using bar command

If you have a mix of relatively high and low values, you might want to consider using the logarithmic scale for the y-axis, i.e....

plus d'un an ago | 0

| accepted

Answered

How to apply function to certain files in directory

Just get the function to work on the selected files in the folder to begin with: i.e. fileNames = dir('*.raw'); % ...

How to apply function to certain files in directory

Just get the function to work on the selected files in the folder to begin with: i.e. fileNames = dir('*.raw'); % ...

plus d'un an ago | 0

| accepted

Answered

How to remove consecutive duplicates ?

Consider the following example: ConsecDuplic = [1 2 2 3 4 5 5 5 6 7 8 9 9] % Logical vector: % check if next val...

How to remove consecutive duplicates ?

Consider the following example: ConsecDuplic = [1 2 2 3 4 5 5 5 6 7 8 9 9] % Logical vector: % check if next val...

plus d'un an ago | 0

Answered

How can I recognize an empty row in the middle of an Excel file?

Consider the following code: % STEP 1: LOAD DATA % load excel file to a table t = readtable('BF1.xlsx'); % thi...

How can I recognize an empty row in the middle of an Excel file?

Consider the following code: % STEP 1: LOAD DATA % load excel file to a table t = readtable('BF1.xlsx'); % thi...

plus d'un an ago | 0

Answered

I need to put data from columns in different cells into one vector

Consider the following example: % 1. Create fake data (you'll use the real data) % create empty cell 1x20 c = cel...

I need to put data from columns in different cells into one vector

Consider the following example: % 1. Create fake data (you'll use the real data) % create empty cell 1x20 c = cel...

plus d'un an ago | 0

Answered

I am getting Unbalanced or unexpected parenthesis or bracket?

*Line 1:* get rid of the comma: if PlotVI_Module *Line 15 and 25:* change round brackets to square ones and you had a on...

I am getting Unbalanced or unexpected parenthesis or bracket?

*Line 1:* get rid of the comma: if PlotVI_Module *Line 15 and 25:* change round brackets to square ones and you had a on...

plus d'un an ago | 1

Answered

how to add numbers and labels to scatterplot bubbles?

There's a function called: * <https://uk.mathworks.com/help/matlab/ref/text.html?s_tid=doc_ta Text> that is used for label...

how to add numbers and labels to scatterplot bubbles?

There's a function called: * <https://uk.mathworks.com/help/matlab/ref/text.html?s_tid=doc_ta Text> that is used for label...

plus d'un an ago | 0

| accepted

Answered

How do I change axes orientation to a desired one

See documentation for: * <https://uk.mathworks.com/help/matlab/ref/view.html?searchHighlight=view&s_tid=doc_srchtitle view> ...

How do I change axes orientation to a desired one

See documentation for: * <https://uk.mathworks.com/help/matlab/ref/view.html?searchHighlight=view&s_tid=doc_srchtitle view> ...

plus d'un an ago | 0

Answered

Cut random 30secs of audio from an audio recording .wav

This code will allow you to import and export all of the audio files in your current folder: % get file names in the ...

Cut random 30secs of audio from an audio recording .wav

This code will allow you to import and export all of the audio files in your current folder: % get file names in the ...

plus d'un an ago | 0

Answered

How to extract information from the filename?

This will get you the structure of all of the text files in your current folder: x = dir('*.txt') % structure In m...

How to extract information from the filename?

This will get you the structure of all of the text files in your current folder: x = dir('*.txt') % structure In m...

plus d'un an ago | 0

Answered

How to find vectors that are multiple of other vectors inside a matrix

I think this will get you going. This code will help you identify which 'NextRow' is a multiplier of 'previousRow': % DATA ...

How to find vectors that are multiple of other vectors inside a matrix

I think this will get you going. This code will help you identify which 'NextRow' is a multiplier of 'previousRow': % DATA ...

plus d'un an ago | 0

Answered

How do i plot?

Is this what you meant? dt = 0.0001; t = 0:dt:0.02; y = (5+cos(20*pi*t)).*cos(2*pi*100*t); figure; plot(...

How do i plot?

Is this what you meant? dt = 0.0001; t = 0:dt:0.02; y = (5+cos(20*pi*t)).*cos(2*pi*100*t); figure; plot(...

plus d'un an ago | 0

| accepted

Answered

How to plot vertical lines for reference using vline?

I've moved my comment to the answer so the question can be closed. I've also tried to copy your example to show you what I think...

How to plot vertical lines for reference using vline?

I've moved my comment to the answer so the question can be closed. I've also tried to copy your example to show you what I think...

plus d'un an ago | 0

Answered

Covariance calculation like excel formula

Given the code: A = randi([18 22], 20,1) B = randi([15 25], 20,1) C = cov(A,B) This is the outcome that you'll...

Covariance calculation like excel formula

Given the code: A = randi([18 22], 20,1) B = randi([15 25], 20,1) C = cov(A,B) This is the outcome that you'll...

plus d'un an ago | 1

| accepted

Answered

How to add an interval to a number?

This example should have the answers to your problems: % Values that can be changed in the code: % d, Xu, Yu % or...

How to add an interval to a number?

This example should have the answers to your problems: % Values that can be changed in the code: % d, Xu, Yu % or...

plus d'un an ago | 1

Answered

2D color or surface plot based on 3 vectors of data

How about this: % interpolation data % as in: % https://uk.mathworks.com/help/matlab/ref/scatteredinterpolant.html?se...

2D color or surface plot based on 3 vectors of data

How about this: % interpolation data % as in: % https://uk.mathworks.com/help/matlab/ref/scatteredinterpolant.html?se...

plus d'un an ago | 0

| accepted

Answered

2D color or surface plot based on 3 vectors of data

In order to be able to use contour plot, your Z data need to be of X*Y size. What you can do is the following: % C is a ma...

2D color or surface plot based on 3 vectors of data

In order to be able to use contour plot, your Z data need to be of X*Y size. What you can do is the following: % C is a ma...

plus d'un an ago | 0

Answered

how compute the pixel sum for image?

# Use <https://uk.mathworks.com/help/matlab/ref/imread.html#btnczv9-1-A imread - output> to load the image into Matlab and store...

how compute the pixel sum for image?

# Use <https://uk.mathworks.com/help/matlab/ref/imread.html#btnczv9-1-A imread - output> to load the image into Matlab and store...

plus d'un an ago | 0

Answered

Getting corresponding y values from moving average graph when having x values

Consider the following example: % RANDOM DATA startDate = datetime(2018,01,01); endDate = datetime(2018,04,01); ...

Getting corresponding y values from moving average graph when having x values

Consider the following example: % RANDOM DATA startDate = datetime(2018,01,01); endDate = datetime(2018,04,01); ...

plus d'un an ago | 1

Answered

To label same X axis twice

You can certainly add minor ticks and show them on the grid but I'm not sure if there's an easy way to label them. In other word...

To label same X axis twice

You can certainly add minor ticks and show them on the grid but I'm not sure if there's an easy way to label them. In other word...

plus d'un an ago | 0

Answered

Long-horizon predictive regressions

The R value calculation is available in Matlab: * <https://uk.mathworks.com/help/matlab/ref/corrcoef.html R coefficient> As ...

Long-horizon predictive regressions

The R value calculation is available in Matlab: * <https://uk.mathworks.com/help/matlab/ref/corrcoef.html R coefficient> As ...

plus d'un an ago | 0

| accepted

Answered

how to save 120 figures in a folder defined by user and later retrieve it?

When you say 120-off figures: * Are these matlab figures *.fig*? Also, see the code below that was used to create what is ...

how to save 120 figures in a folder defined by user and later retrieve it?

When you say 120-off figures: * Are these matlab figures *.fig*? Also, see the code below that was used to create what is ...

plus d'un an ago | 0