Answered
How can I find the centroid of an object in an image and crop a portion of it around that centre point
This is a rough code to detect the centroid of the object. I interpreted that the "object" is the largest one seen in the center...

7 maanden ago | 0

Answered
cell配列のをcsvで保存する方法
3行目の数値配列をばらしてもいいですか?tableにしてwritetableを使うのがよさそうです。 clear TEST for i = 1:3 TEST{1,i} = strcat('test',num2str(i)); end fo...

8 maanden ago | 1

| accepted

Answered
Image Segmentation of human skin
I could show a result, though I'm not sure this meets you. The strategy is simple. First, non-skin (air?), shallower skin (bluis...

8 maanden ago | 1

| accepted

Answered
How to automatically introduce a nested layer of for-loop?
Hi, This is a possibility: N = 4; % the loop number X = rand(1,3); % simulated X products = ones(ones(1,N)*3); reshape_arr...

8 maanden ago | 1

| accepted

Answered
Percentage of time of a time series
How about using diff function to your time vector data? The following is an example. The details need to be modified. % time_ve...

8 maanden ago | 0

Answered
変数の作成について
eval関数を使う方法があります。eval関数は中に入れた文字列が、あたかもコマンドとしてそのまま実行されるものです。 TEST = 'set'; A = 1; command = [TEST, ' = A']; % 'set = A' eval(...

8 maanden ago | 2

| accepted

Answered
How to giving same group of number on image using bwlabel?
How about using bwlabeln or bwconncomp? They can apply to 3-dimensional data.

8 maanden ago | 0

Answered
Normalization of gradient image
For the case using sobel kernel, multiply 1/8 to the resulted values: [Gmag,Gdir] = imgradient(I, 'sobel'); Gmag_normalized = ...

8 maanden ago | 0

| accepted

Answered
Azimuth data: Colormap wrapping when performing interpolation
As you noticed, phase is discontinuous function. One can convert this to the continuous function, for example, by using cosine a...

8 maanden ago | 0

| accepted

Answered
load関数に使うファイル名
load(sprintf('inv#%3d.mat',n)) ではどうですか?

8 maanden ago | 1

| accepted

Answered
How do I randomize a sequence of random numbers?
repmat just repeats the input matrix. So, for what you want, the repeated matrix must change. I think the easiest way is like: ...

8 maanden ago | 0

| accepted

Answered
how to create a matrix of values from a X and Y coordinates
First, the xy cordinate must be converted to indices which are the coordinates of your matrix. % dx, dy: minimum sampling inter...

8 maanden ago | 0

Answered
How do i fix the negative and identical outputs i am getting under the FOR loop?
"c", the speed of light, defined before the loop is overwritten in the loop. This causes the problem.

8 maanden ago | 0

| accepted

Answered
Image Blur using mean of nearby pixels
The error comes from "imread". The function expects "The file name or URL argument" as input, but "img" seems not so. "img" can ...

8 maanden ago | 0

Answered
how to convert a 2D array x and y to a limited number of pixels?
nested for-loop runs slowly. The following is a faster way. %% data preparation IM1=zeros(640,640,3); pixel_size=0.01984375; ...

8 maanden ago | 0

| accepted

Answered
Converting a base ten number into a base two number?
Interesting. Another way to utilize your code. This is a kind of normalization. After calculation, the number of digits is resto...

8 maanden ago | 0

Answered
How do you obtain the values for each of n-times simulation of a nested while loop?
In your code, the resulted evidInteg1 and evidInteg2 remain in the next loop. Hence, once your condition (evidInteg1< threshold ...

8 maanden ago | 0

| accepted

Answered
分類器のvalidation accuracyはなぜ毎回異なるのか
精度が毎回変わるのは、学習用のデータと検証用のデータが毎回ランダムに変わるためだと思います。 [imdsTrain,imdsValidation] = splitEachLabel(imds,numTrainFiles,'randomize'); % こ...

8 maanden ago | 2

| accepted

Answered
How can I plot locus of a rotating phasor with time?
This is a simple example. Plase change "A" and "theta" to what you like. t = 0:0.01:10; % time A = t.^2; % amplitude changing ...

8 maanden ago | 0

Answered
How to find connected components ?
The error seems to come from "imshow" function, since cc is not an image, but a structure. You need to convert cc to labelimage...

8 maanden ago | 0

| accepted

Answered
Image Transformation - Histogram Shifting
If a value is added to all the pixels, the histogram shifts to the right. MATLAB commands are: brighter = gray + 50; % histogr...

9 maanden ago | 0

Answered
2次元配列における任意の座標からの積分値を求める方法を教えて下さい。
cumsum関数を利用する方法があるかと思います。 足しこんでいく方向をコントロールできますのでこれを利用して、出発点は(1,1),(1,end),(end,1),(end,end)から選ぶことができます。 行列の任意の位置を起点としたい場合は、1.そ...

9 maanden ago | 1

| accepted

Answered
頻度分布の水平マップ
ご記入の内容からでは、データの構造を把握しきれなかったので、見当違いな回答かもしれません。 上記のコードで5m/sを超えた時の回数を計算できているのでしたら、 Windspeed_all = WindSpeed>=0 とすれば、全速度の回数(計測回数...

9 maanden ago | 2

| accepted

Answered
ナイキスト線図やボード線図のタイトルを消したい
figure描画後、 title([]); でタイトルを消去することができます。

9 maanden ago | 3