已回答
Compare two columns under 3 conditions
The following code counts the number of rows which meet the condition 2. nnz(phases(:,2) == 2 & phases(:,1) == 1) hope this he...

6 years 前 | 0

已回答
How make the background of pcshow white instead of black?
Hi, you also need: set(gca,'color','w');

6 years 前 | 2

已回答
MATLAB Image Edge Detection
This is one complicated example. I wanted it to be simpler. I'm afraid that white area in your image is a obstacle for Hough tra...

6 years 前 | 0

已回答
How to remove shadow for ceramic tile?
Hi. As for the picture A, the removal of the shadow is quite difficult, since it is difficult even by eyes. As for the picture ...

6 years 前 | 1

已回答
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...

6 years 前 | 0

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

6 years 前 | 1

| 已接受

已回答
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...

6 years 前 | 1

| 已接受

已回答
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...

6 years 前 | 1

| 已接受

已回答
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...

6 years 前 | 0

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

6 years 前 | 2

| 已接受

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

6 years 前 | 0

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

6 years 前 | 1

| 已接受

已回答
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...

6 years 前 | 1

| 已接受

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

6 years 前 | 1

| 已接受

已回答
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: ...

6 years 前 | 0

| 已接受

已回答
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...

6 years 前 | 0

已回答
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.

6 years 前 | 0

| 已接受

已回答
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 ...

6 years 前 | 0

已回答
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; ...

6 years 前 | 0

| 已接受

已回答
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...

6 years 前 | 0

已回答
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 ...

6 years 前 | 0

| 已接受

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

6 years 前 | 2

| 已接受

已回答
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 ...

6 years 前 | 0

已回答
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...

6 years 前 | 0

| 已接受

已回答
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...

6 years 前 | 0

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

6 years 前 | 1

| 已接受

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

6 years 前 | 2

| 已接受

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

6 years 前 | 3