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...

7 months 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...

7 months ago | 0

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

7 months 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.

7 months 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 = ...

7 months 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...

7 months ago | 0

| accepted

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

7 months 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: ...

7 months 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...

7 months 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.

7 months 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 ...

7 months 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; ...

7 months 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...

7 months 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 ...

7 months ago | 0

| accepted

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

7 months 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 months 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 months 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...

8 months ago | 0

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

8 months ago | 1

| accepted

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

8 months ago | 2

| accepted

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

8 months ago | 3