Community Profile

# Shunichi Kusano

### MathWorks

53 total contributions since 2019

View details...

Contributions in
View by

1次元信号の内挿でしたらinterp1で行えます。 下のサンプルはsin波を異なる時間でサンプリングしたときの例となります。 t1 = sort(rand(1,20)).*2*pi; t2 = sort(rand(1,15)).*2*pi; y1 ...

7 days ago | 1

Fill gaps using Nan in for loop
Hi Jaehwi, I wrote code. hope this helps. data = [0 50; 1 100; 2 200; 3 300; 5 500; 6 600; 7 700; 10 1000; 0 30; 2 20; 6 40;];...

24 days ago | 0

Create colormap to represent value intervals [0 1]
Hi Fiona, how about labeling image? The following code is the example. %% image load img = double(rgb2gray(imread('coloredChi...

1 month ago | 0

| accepted

Need help moving files based on name
Hi Benjamin, you can pick up the filename with the specific day as the followings: for i = 1:30 % from 1st to 30th search...

1 month ago | 0

How to solve the "Subscript indices must either be real positive integers or logicals." error.
Hi Naiara, The error occurs, since you use "dt" as an array, though it is a scalar. The problem is the first "dt" of each sente...

1 month ago | 0

Counting number of same neighbourhood pixels between two matrices.
Hi Tan, If "similar" means "exactly the same" or "the difference is zero", it is not difficult to implement. What the following...

1 month ago | 0

| accepted

Image Processing B&W Picture Calculate Color Percentage
Hi Andar, this is the sample code. img = imread('cameraman.tif'); imshow(img); th = 100; % threshold to select brighter pixel...

1 month ago | 0

imread による以下のプログラムで　I_cr = imcrop(I, [125, 64, 536, 482]);　で画像を切り抜き後　の処理で発生するエラー回避の方法
ちょっと試してみたのですが、ご提示のコードできちんと動きました。 もしかすると読み込んだ画像がRGB画像ではないでしょうか。 IがRGB画像だと同じエラーが出ました。必要なレイヤだけを取り出して(I=I(:,:,1)など)処理したところ、きちんと回りま...

2 months ago | 0

2 months ago | 0

| accepted

How can I convert data format from "datetime" to "year&num" format?
Hi, jee. "w" must be in uppercase, "W". This is a sample code. x(1) = datetime("1984-03-02 00:00:00"); x(2) = datetime("2019...

2 months ago | 0

| accepted

While loop with random walk
I'm not sure if this is exactly what you want. clear num_stp=2000; position=zeros(size(num_stp)); for i=1:num_stp ...

2 months ago | 0

3 months ago | 0

| accepted

3 months ago | 0

Cell-Averaging CFAR DetectorにおけるCUTが端のセルの場合の処理について
コードをたどってみますと、配列からはみ出す部分については考慮されないようです。図だとターゲットから見て右半分のウィンドウだけを使って計算されることになり、配列からはみ出す左半分の窓はそもそもないものとなります。 もし、図のように循環的な窓にしたいなどがあ...

4 months ago | 1

| accepted

Grid in imagesc() not lining up to grid limits?
Hi Jonathan. The pixel coordinate is normal in your image. The center of each pixel is located at the cross of the grid lines. N...

4 months ago | 0

how can I create projected grid (UTM) to import in Qgis ?
When creating geotiff file, you can specify UTM coordinates. This is the link.

4 months ago | 0

Time for a series of pictures
Hi, Mohammed. You need cumsum function. (https://www.mathworks.com/help/matlab/ref/cumsum.html)

4 months ago | 0

| accepted

a 2D into a 3D Array
Hi. You can do it by reshape and permute like: PICT = [PICT; zeros(2, 2049)]; % (34803 2049) a = reshape(PICT.', 2049, 9, 386...

4 months ago | 2

| accepted

Problem with LFM chirp code
maybe chirp(t,1e9,10e-3,2e9); % Rise time 10ms -> 10e-3 is correct. However, the array size is quite large even in this case. ...

4 months ago | 0

Distributing the lines of any Matrix Randomly
A(randperm(3,3),:) hope this helps.

4 months ago | 0

| accepted

Indicate peak value of a signal in matlab plot
Does this meet your thought? I just changed the example of "findpeaks" a little. %% sample signal generation x = linspace(0,1,...

5 months ago | 0

| accepted

アナログ入力をプロットするときのエラーを無くす方法
timeが構造体ではないようですが、time.dataですとtimeが構造体であることが前提のコードになってしまっています。そのためのエラーではないでしょうか。 dispコマンドはデータを表示する関数で処理結果に影響はしないので、コメントアウトしてしまう...

6 months ago | 2

| accepted

Fixing loop values while plotting
Your code almost works. You need a closing parenthesis. plot(vals.b(vals.y==1 & vals.z==1,vals.x(vals.y==1 & vals.z==1)) % your...

6 months ago | 1

ワークスペース上の構造体の中のデータを、strcatコマンドで作った文字列で指示した、名称のデータを読み込ませたい。
matファイルの中身に複数の構造体が入っているとのことですので、matファイル読み込みの際に Signals = load('***.mat'); のように読み込むと、全てを含んだ構造体配列が一つできます。 構造体配列の各フィールドには文字列形式での...

6 months ago | 3

| accepted

Detecting multiple object in an image
You select only one of highly correlated pixels, because you find the maximum correlation by "find(R==(max(max(R))))". In order ...

7 months ago | 0

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

7 months ago | 0

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

7 months ago | 1

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

7 months ago | 0