Answered

Remove the border lines.

How about using surf function with 'FaceColor' = 'interp' option, instead. Here is an example. figure surf(xx1,yy1,z1,'FaceCo...

Remove the border lines.

How about using surf function with 'FaceColor' = 'interp' option, instead. Here is an example. figure surf(xx1,yy1,z1,'FaceCo...

16 hours ago | 0

Answered

how to count daily events from a time series data

How about the following? % Read your text data file T = readtable('test.txt'); % Create datetime vector Time = datetime(T....

how to count daily events from a time series data

How about the following? % Read your text data file T = readtable('test.txt'); % Create datetime vector Time = datetime(T....

20 hours ago | 0

Answered

Extracting coordinates values for the line.

How about the following? % Load data and convert to gray-scale image load('v.mat'); Igray = mat2gray(v); % Apply multileve...

Extracting coordinates values for the line.

How about the following? % Load data and convert to gray-scale image load('v.mat'); Igray = mat2gray(v); % Apply multileve...

20 hours ago | 0

Answered

Kmeans (Initialise centroids)

Like this? % Apply k-means clustering to data set X (e.g num of classes = 2), and obtain centroids C numClass = 2; [cluster,C...

Kmeans (Initialise centroids)

Like this? % Apply k-means clustering to data set X (e.g num of classes = 2), and obtain centroids C numClass = 2; [cluster,C...

21 hours ago | 0

| accepted

Answered

plotを使った四分木分割をしたいです。

Image Processing Toolboxの関数 qtdecomp を使うのはいかがでしょうか。 以下はその一例です。 % 与えられた(x,y)座標が1(他は0)の16x16配列Iを作成 a = [2 2; 7 2; 3 7; 6 6; 8 9...

plotを使った四分木分割をしたいです。

Image Processing Toolboxの関数 qtdecomp を使うのはいかがでしょうか。 以下はその一例です。 % 与えられた(x,y)座標が1(他は0)の16x16配列Iを作成 a = [2 2; 7 2; 3 7; 6 6; 8 9...

2 days ago | 1

| accepted

Answered

connect median in a boxplot

Like this? % Sample data Data = randn(100,10); % Calculate median for each column med = median(Data); % Visualize the r...

connect median in a boxplot

Like this? % Sample data Data = randn(100,10); % Calculate median for each column med = median(Data); % Visualize the r...

9 days ago | 0

| accepted

Answered

Return index of datetime column in a table

If your HData.Time column is string: % index of zero seconds idx_s = cellfun(@(x) ~isempty(x),regexp(HData.Time,'00$','match')...

Return index of datetime column in a table

If your HData.Time column is string: % index of zero seconds idx_s = cellfun(@(x) ~isempty(x),regexp(HData.Time,'00$','match')...

25 days ago | 0

| accepted

Answered

surf plot from text file

Like this? data = dlmread('exportfilecst4.txt'); x = data(:,1); y = data(:,2); z = data(:,6); figure surf(reshape(x,31...

surf plot from text file

Like this? data = dlmread('exportfilecst4.txt'); x = data(:,1); y = data(:,2); z = data(:,6); figure surf(reshape(x,31...

1 month ago | 1

| accepted

Answered

retime only for specific gaps on time

How about the following solution? % Sample timetable with 2 gaps (e.g >1 hour) Time = datetime('now') + minutes(cumsum(45*rand...

retime only for specific gaps on time

How about the following solution? % Sample timetable with 2 gaps (e.g >1 hour) Time = datetime('now') + minutes(cumsum(45*rand...

1 month ago | 2

| accepted

Answered

How to assign points to multiple polygons using inpolygon

Looking at your data, one of the Points is outside of the convex hull of polygon A's coordinates. So "inpolygon" function will n...

How to assign points to multiple polygons using inpolygon

Looking at your data, one of the Points is outside of the convex hull of polygon A's coordinates. So "inpolygon" function will n...

2 months ago | 0

Answered

三角形膜要素の分布図(任意の（x,y)座標で）を作成したいのですが、方法はありませんでしょうか。

ご説明ありがとうございます。おおよそ理解しました。 まず、任意の (x,y) 座標に対して何らかの値 z （例えば関数 z = f(x,y) の出力値）があったとして、それらの隣接する点どうしを三角形で結んで3次元曲面として表示するには、以下のようにす...

三角形膜要素の分布図(任意の（x,y)座標で）を作成したいのですが、方法はありませんでしょうか。

ご説明ありがとうございます。おおよそ理解しました。 まず、任意の (x,y) 座標に対して何らかの値 z （例えば関数 z = f(x,y) の出力値）があったとして、それらの隣接する点どうしを三角形で結んで3次元曲面として表示するには、以下のようにす...

2 months ago | 1

| accepted

Answered

How can I convert multiple images (all the same size) into one matrix?

To create image dataset for training a neural network, imageDatastore should be an easy and promissing way. So I would recommend...

How can I convert multiple images (all the same size) into one matrix?

To create image dataset for training a neural network, imageDatastore should be an easy and promissing way. So I would recommend...

2 months ago | 0

Answered

How to stretch matrix

Not so sophisticated, but intuitively clear way: y = repelem(x,2); y(2:2:end) = y(2:2:end)+1;

How to stretch matrix

Not so sophisticated, but intuitively clear way: y = repelem(x,2); y(2:2:end) = y(2:2:end)+1;

2 months ago | 1

Answered

Trouble importing similar .txt files using readtable (error: all lines must have the same number of delimiters)

I think the following way would be more stable. % Read data fid = fopen('Error.txt','r'); str = textscan(fid,'%s','Delimiter'...

Trouble importing similar .txt files using readtable (error: all lines must have the same number of delimiters)

I think the following way would be more stable. % Read data fid = fopen('Error.txt','r'); str = textscan(fid,'%s','Delimiter'...

2 months ago | 1

| accepted

Answered

How to detect change in mean value of a signal

It may need to apply "smoothing" before detecting changes larger than 10,000. Looking at your data, ~2000 points movmean will cl...

How to detect change in mean value of a signal

It may need to apply "smoothing" before detecting changes larger than 10,000. Looking at your data, ~2000 points movmean will cl...

2 months ago | 0

| accepted

Answered

Checking if word/words are present in a sentence in a table cell.

Like this? % A sample data T = cell2table({... 'M3 TRIPPED xyz','abc','pqr';... 'def','M3 TRIPPED 123','ghi'}); % Fin...

Checking if word/words are present in a sentence in a table cell.

Like this? % A sample data T = cell2table({... 'M3 TRIPPED xyz','abc','pqr';... 'def','M3 TRIPPED 123','ghi'}); % Fin...

2 months ago | 1

Answered

Looking for the ways to categorize the black dots by the number of pixels...

I strongly believe the regionprops function will be your help. The following is an example: % Read image and binarize I = imre...

Looking for the ways to categorize the black dots by the number of pixels...

I strongly believe the regionprops function will be your help. The following is an example: % Read image and binarize I = imre...

2 months ago | 0

| accepted

Answered

積み上げグラフのcolormapについて

たとえば以下のような方法ではいかがでしょうか？ % Sample data and color map y = rand(3,10); color = colorcube(size(y,2)); % Visualize the data fi...

積み上げグラフのcolormapについて

たとえば以下のような方法ではいかがでしょうか？ % Sample data and color map y = rand(3,10); color = colorcube(size(y,2)); % Visualize the data fi...

2 months ago | 1

| accepted

Answered

reverse 3D euclidean distance

There should be 2 answers. Here is my try. P = [3 1 4;12 1 4; 34 2 4]; D = [81 36 601]; func = @(x) (vecnorm(x - P(1,:))-s...

reverse 3D euclidean distance

There should be 2 answers. Here is my try. P = [3 1 4;12 1 4; 34 2 4]; D = [81 36 601]; func = @(x) (vecnorm(x - P(1,:))-s...

2 months ago | 1

Answered

エラーバーグラフの凡例のマーカーからエラーバーを抜く方法

エラーバーチャートの上に空のグラフ（エラーバー無し）を上書きして、そのグラフに対して凡例を指定する、というのはいかがでしょうか？ 以下はその一例です。 % Sample data x = 1:10:100; y = 100*rand(1,10); ...

エラーバーグラフの凡例のマーカーからエラーバーを抜く方法

エラーバーチャートの上に空のグラフ（エラーバー無し）を上書きして、そのグラフに対して凡例を指定する、というのはいかがでしょうか？ 以下はその一例です。 % Sample data x = 1:10:100; y = 100*rand(1,10); ...

2 months ago | 2

| accepted

Answered

How to repeatedly subdive vector rectangle into equal area?

How about using histogram2 function? The following is an example. % make dummy data x = 10*rand(30,1); y = 25*rand(30,1); ...

How to repeatedly subdive vector rectangle into equal area?

How about using histogram2 function? The following is an example. % make dummy data x = 10*rand(30,1); y = 25*rand(30,1); ...

2 months ago | 0

| accepted

Answered

How do you calculate a trajectory through a series of 3D points using cubic splines?

One possible straight-forward way would be like this: Actually, spline interpolation seems to be better than cubic spline... B...

How do you calculate a trajectory through a series of 3D points using cubic splines?

One possible straight-forward way would be like this: Actually, spline interpolation seems to be better than cubic spline... B...

2 months ago | 1

Answered

How can I find RGB values of a matrix of coordinates of an image?

Another possible solution: row = round(centers(:, 1)); col = round(centers(:, 2)); R = arrayfun(@(x,y) P(x,y,1),row,col); ...

How can I find RGB values of a matrix of coordinates of an image?

Another possible solution: row = round(centers(:, 1)); col = round(centers(:, 2)); R = arrayfun(@(x,y) P(x,y,1),row,col); ...

2 months ago | 0

Answered

How can I change the retime function in order to do a median(A,'omitnan')?

How about the following? retime(Liv_dom_an, 'monthly', @(x) median(x,'omitnan'))

How can I change the retime function in order to do a median(A,'omitnan')?

How about the following? retime(Liv_dom_an, 'monthly', @(x) median(x,'omitnan'))

2 months ago | 0

| accepted

Answered

Surface area calculation for irregular shape

How about the following? %% Example in the following page % https://jp.mathworks.com/help/matlab/visualize/visualizing-volume-...

Surface area calculation for irregular shape

How about the following? %% Example in the following page % https://jp.mathworks.com/help/matlab/visualize/visualizing-volume-...

2 months ago | 0

Answered

Eye Diagram from text file values

The following is one simple example. I hope this would be some help for your research! % Load PRBS pattern D = dlmread('PRBS_...

Eye Diagram from text file values

The following is one simple example. I hope this would be some help for your research! % Load PRBS pattern D = dlmread('PRBS_...

2 months ago | 0

Answered

How to cluster a network?

How about applying biconncomp function? The following is an example: % Sample Graph s = [1 1 2 2 3 4 4 5 6 6 7 7 8]; t = [2 ...

How to cluster a network?

How about applying biconncomp function? The following is an example: % Sample Graph s = [1 1 2 2 3 4 4 5 6 6 7 7 8]; t = [2 ...

2 months ago | 0

Answered

Binary String Generator With Minimum Distance

How about using BCH code ? Theoretically, BCH(n,k) encoded binary sequences has minimun distance of bchnumerr(n,k)*2+1. So if ...

Binary String Generator With Minimum Distance

How about using BCH code ? Theoretically, BCH(n,k) encoded binary sequences has minimun distance of bchnumerr(n,k)*2+1. So if ...

2 months ago | 2

| accepted

Answered

How to prevent envelope crossing through function.

That is due to a characteristics of interpolation method (Spline) used in the envelope function. How about detecting peaks and i...

How to prevent envelope crossing through function.

That is due to a characteristics of interpolation method (Spline) used in the envelope function. How about detecting peaks and i...

2 months ago | 2

| accepted

Answered

How to plot intensity profile of an image

Hi Warid-san, You can do it by the same way, like the following. I = imread('Capture.PNG'); % Since size(I,2)/2 = 215.5, I ...

How to plot intensity profile of an image

Hi Warid-san, You can do it by the same way, like the following. I = imread('Capture.PNG'); % Since size(I,2)/2 = 215.5, I ...

2 months ago | 1