Answered
How to export array elements?
How about the following? A = (1:20)'; N = numel(A); idx = mod(0:N-1,10)' <= 1; X = cell(5,1); for kk = 1:5 X{kk} = A...

7 months ago | 0

|accepted

Answered
char array to pick
The solution should be: b = a(:,2:3);

8 months ago | 0

|accepted

Answered
Help with findgroups command
Like this? a = {... 'apples' 1 2;... 'orange' 2 3;... 'apples' 3 4;... 'Pear' 4 5;... 'apples' 5 6;}; % Ext...

8 months ago | 0

|accepted

Answered
List of Node pairs
另一个可能的解决方案:numNode = 4;[r、c] = find(~eye(numNode)); v = [c,r]; >> v v = 1 2 1 3 ...

8 months ago | 1

|accepted

Answered
cell配列内の特定の行を取り出し,それらの行を一つのcell配列にまとめることはできますか?
対象の cell 配列を C1 とすると、以下のようにして抽出可能です。 idx = cellfun(@(x) x == 4, C1(:,3)); C2 = C1(idx,:);

8 months ago | 0

|accepted

Answered
テーブルと構造体の結合
変数 B が数値配列ということでしたら、array2table で table 型に変換できます。 T = [A, array2table(B)];

8 months ago | 1

Answered
Trying to set Y-Axis to Minutes:Seconds for swim times. Would like to set range from 0 to 3:30 and eliminate leading zeros
How about the following solution? % Sample data t = 0.25+3*rand(100,1); % Create boxplot figure boxplot(t) d = 0:0.5:3.5...

8 months ago | 0

Answered
plotting bar graph using matlab
How about using a stem plot? The following is an example: tt = readtimetable('data.txt'); figure stem(tt.Time, tt.Var1,'Ma...

9 months ago | 1

|accepted

Answered
How to find local peaks in a 3D plane
How about the following? % Load data load('positionsplane.mat'); % Arrange it as a table variable tData = array2table(posi...

9 months ago | 0

|accepted

Answered
Linear Interpolation hard task
As @Walter Roberson -san suggested, timetable and retime is the best solution. Please try the following: TT = readtimetable('_s...

9 months ago | 0

Answered
How can I extract unique pairs of matrix in reverse order?
How about the following way? A = [... 1 1 2;... 2 1 4;... 3 2 1;... 4 2 3;... ...

9 months ago | 0

Answered
findpeaks関数を使って暗い画像の中に存在する広がりのある輝点を検出したいのですが、方法はありますか?
試しに簡単なプログラムを作成してみました。行方向と列方向でピークを検出してプロットすると、検出されたピーク点は輝点の上に十字型に表示されます(右図)。ただ、輝点内の輝度分布によっては十字の縦と横の線がきれいなラインにならない場合や、中央でクロスしない場合な...

9 months ago | 1

Answered
findpeaksの閾値設定について
@Ibuki Takahashi さん、ご説明ありがとうございます。 「xの値の範囲が10以下の時」という条件を、「ピークの半値全幅 (FWHM: Full Width at Half Maximum) が 10以下の時」と近似的に読み替え可能でしたら、...

9 months ago | 1

|accepted

Answered
Reed Solomon encoding/decoding for binary data
Since RS system object has 'BitInput' option, I would recommend using comm.RSEncoder rather than rsenc if you want to evaluate F...

9 months ago | 1

|accepted

Answered
How to quickly find out the repeat integers in an array?
I believe it's time to use accumarray function! How about the following? A = [4 20 5 4 7 5 9 5 31]; B = accumarray(A',1); ...

10 months ago | 0

|accepted

Answered
8 - bit linear feedback shift register
How about using comm.PNSequence in Communications Toolbox?

12 months ago | 0

Answered
基準値の倍数に....
以下のような処理ではいかがでしょうか? c = 0.3; % 基準値 inValue = 5*rand(10,1); % 切り上げ/切り捨て前の値 outValue = c*round...

1 year ago | 0

Answered
Errors in transfer learning using resnet101
Since ResNet-101 is imported as a DAGNetwork object, the following steps will be needed (more details can be found in this Link)...

1 year ago | 3

|accepted

Answered
Read a 55x55 matrix with matlab
How about the following? A = readmatrix('Averaging_kernel_MLS_v04_0N.txt'); A = reshape(A',60,[])'; A = A(:,1:55);

1 year ago | 0

Answered
グラフの目盛りを片方だけ非表示にする方法
box off と設定したときに表示されるプロットのようなイメージでしょうか? figure plot(magic(4)) box off

1 year ago | 0

Submitted


MATLABによる予知保全のデモ
データをもとに異常状態を検出する手法として、これまで様々な手法が提案されています。そのなかでも、多次元データの中から「教師なし」で異常を検出する手法は実用上とても重要な手法です。本デモでは、代表的な「教師なし」の異常検出アルゴリズム3つをご紹介します。

1 year ago | 3 downloads |

Thumbnail

Answered
特定の範囲における二値化について(初心者です)
以下のような処理になるかと思いますが、いかがでしょう? % グレースケール画像を準備 I = imread('cameraman.tif'); % 幅の半分、閾値1、閾値2を準備 wHalf = round(size(I,2)/2); th1...

1 year ago | 0

|accepted

Answered
構造体配列の並び替え (降順)
struct2table 関数でいったんテーブル型変数に変換して、sort 関数でソートしたうえで再び table2struct 関数で構造体配列に戻す、という方法ではいかがでしょうか?

1 year ago | 0

|accepted

Answered
空行列の判定方法
以下の方法ではどうでしょうか? % 例として、A(1,2)とA(2,1)がカラのセル配列を作成 A = cell(2,2); A{1,1} = rand(2); A{2,2} = rand(2); % カラのセルのインデックスを取得 idx...

1 year ago | 0

Answered
Use sorted variable to reorder rows of a matrix
How about the following solution? test = sum(Index_matrix==0, 2); [~, order] = sort(test); Index_matrix = Index_matrix(order,...

1 year ago | 0

|accepted

Answered
任意の点を中心に指定したサイズでトリミングを行いたい
imcrop 関数を使って、以下のようにするとトリミングできます。 I = imread('student.jpg'); % 中心とcropするサイズ cent = [376, 687]; sz = [408, 408]; % [x, y...

1 year ago | 0

|accepted

Answered
reshapeで空欄を詰めない方法
出力をN行3列の配列にするには、各行の要素数を3に揃える必要があります。このため、ご質問のようなケースでは各行の要素数を揃えるために空欄を別の値で埋める必要があります。例えば空欄をNaNで埋めるとして、下記のような方法はいかがでしょうか? A = [1 ...

1 year ago | 0

|accepted

Answered
findで特定した位置の個所にあるピクセルを拡張したいです。
以前ご質問頂いた内容のつづきと想定して、以下のような処理でしょうか? I = imread('image.jpeg'); % 画像読み込み BW = imbinarize(rgb2gray(I)); % 2値化 BW = ~BW; ...

1 year ago | 0

|accepted

Answered
変数の凡例の付け方
ご質問の文面より、1つの図 (figure) 内に10個のデータをプロットするとともに凡例もあわせて表示したいと理解しました(間違っていたらご指摘ください)。その場合、以下のようにすれば良いかと思います。 figure hold on for j=1...

1 year ago | 0

Answered
forを使って測定した情報すべてを纏めるにはどのようにすればいいでしょうか?
とくに for ループを使う必要がなければ、filter2 関数で同じことが可能です。以下は簡単なサンプルコードです。 I = imread('image.jpeg'); %画像読み込み BW = imbinarize(rgb2gray(I)); %2...

1 year ago | 0

|accepted

Load more