Respondida
グレースケール化のエラー
おそらく、もとの画像ファイルがインデックス付き画像ファイルになっていることが原因と思われます。 その場合、以下のようにいったん通常のRGB画像に変換したうえでグレースケール化すれば大丈夫です。 [IDX, cmap] = imread('2007_00...

más de 5 años hace | 0

| aceptada

Respondida
correlation of signals and finding time delays
If you have Signal Processing Toolbox, please try finddelay function.

más de 5 años hace | 0

| aceptada

Respondida
角度の求め方
アークコサイン(逆余弦関数)を使って求めることができます。MATLABの関数としては、acos 又は acosd になります。出力される角度θを、前者はラジアン、後者は度として出力します。 % 例: cos(θ) = 0.5 のθを求める theta_...

más de 5 años hace | 0

| aceptada

Respondida
重複したデータを削除する方法
findgroups と splitapply を使う方法はいかがでしょうか? A = [600 142 30 75 13; 600 141 30 75 14; 600 142 30 80 14]; group = findgroups(A(:,4))...

más de 5 años hace | 1

| aceptada

Respondida
plot3でのエラー解決方法
waterfall 関数を使って、ウォーターフォールプロットとして可視化するというのは如何でしょうか? 以下は簡単な例です。 % Sample data t = 0:0.1:20; data = zeros(7,numel(t)); for kk...

más de 5 años hace | 0

Respondida
How to binarize a grayscale image with multiple thresholds?
Assuming a grayscale image img is a 2D double array, the following code should work: b = img > t1 | img < t2;

más de 5 años hace | 0

| aceptada

Respondida
二次元グラフのグラデーション方法
scatter 関数の第4引数で各ポイントの色をコントロールすることができます。例えばご質問のプログラムですと、以下のようになります。 scatter関数の詳細は以下をご参照ください。 https://jp.mathworks.com/help/mat...

más de 5 años hace | 0

Respondida
Plotting target points within an n radius plot
How about the following solution? % Data points (N = 10, for example.) numPoints = 10; detRange = 2*pi*(rand(numPoints,1)); ...

más de 5 años hace | 0

| aceptada

Respondida
Hi I need help with for loop
No need to use for-loop. How about the following way? % Read data file T1 = readtable('A1_input.txt'); % Postion of (x,y) a...

más de 5 años hace | 0

Respondida
Remove noise from image
How about applying median filter? The following is an example: % Read the image and convert it to grya-scale I = imread('gray...

más de 5 años hace | 1

| aceptada

Respondida
任意の空セルに数値を代入する方法を教えてください
例えば、以下のような処理はいかがでしょうか? % Sample cell array (A(1,2) and A(2,2) are empty) A = {'abc',[];123,''}; % Detect empty cell(s) and ...

más de 5 años hace | 0

| aceptada

Respondida
二次元グラフとそれに対応したカラーバーを表示させる方法
imagesc を使ってデータをヒートマップとして可視化するのはいかがでしょうか? ご参考までに、簡単な例を作成してみました。 % Sample Data x = linspace(0,2*pi); y = 0.01 + sin(x).^2; ...

más de 5 años hace | 1

Respondida
How to convert a cell to matrix?
How about the following way? % Convert to numeric array maxLen = max(cellfun(@numel,A)); A = cellfun(@(x)[x, NaN(1,maxLen - n...

más de 5 años hace | 1

| aceptada

Respondida
join tables by categorical variable
Please try innerjoin or outerjoin functions, like: c1 = innerjoin(a,b,'Keys','Var1'); c2 = outerjoin(a,b,'Keys','Var1','MergeK...

más de 5 años hace | 0

Respondida
remove nodes without changing the numbering of nodes
How about setting a nodelabel for each node? The following is an example: s = [1 1 1 2 2 3]; t = [2 3 4 3 4 4]; % Create a...

más de 5 años hace | 1

| aceptada

Respondida
How to change color bar limits in imagesc?
You can do that task by setting CLim of the axes, like: figure imagesc(rand(4)); ax = gca; ax.CLim = [0 1]; colorbar

más de 5 años hace | 2

| aceptada

Respondida
why does the sound with different sampling frequency sounds the same ?
That's the basic of the 'Sampling theorem'. As long as frequency component of the signal is less than Nyquist frequency ( = samp...

más de 5 años hace | 0

| aceptada

Respondida
fit結果の各項目毎のプロット
関数fitが出力するcfitオブジェクトの中には、近似曲線の各係数が保存されていますので、これを使ってそれぞれのgauss曲線を描画することができます。 % Sample data x = linspace(0,3*pi); y = sin(x).^...

más de 5 años hace | 0

| aceptada

Respondida
create a matrix using a vector such that each row is one offset of the previous row
If the output matrix is always N-by-3, the following straight-forward way might be enough: matrix = [v(1:end-2);v(2:end-1);v(3:...

más de 5 años hace | 0

Respondida
plotコマンドを使わずに、新規figureに元のグラフをコピーをする。
copyobj を使うのはいかがでしょうか? たとえばご質問頂いた例では、以下のようになります。 figure ax1 = axes('Position',[0.1, 0.55 , 0.8182, 0.4091]); ax2 = axes('Pos...

más de 5 años hace | 0

| aceptada

Respondida
グラフ上の座標の取得
figureのコールバック関数 (WindowButtonDownFcn, WindowButtonUpFcn) を使うというのは、いかがでしょうか? たとえば以下のようにすると、マウスの左ボタンを押した時と解放した時の座標を、それぞれ取得することができ...

más de 5 años hace | 1

| aceptada

Respondida
Calculate duration from labeled timestamped data.
Thank you for providing your data. I believe the following is an possible solution. I hope this will be somehow helpful for you...

más de 5 años hace | 0

| aceptada

Respondida
How to rescale table columns
normalize function can do that task, like: rescaledTable = normalize(yourTable,'range');

más de 5 años hace | 0

| aceptada

Respondida
文字列の置き換えについて
条件の数が、ご質問の例のように3個程度であれば、以下のようにして置き換えることができます。 % (1) Straight-forward solution idx = startsWith(A,"A"); A(idx) = "1"; idx = s...

más de 5 años hace | 0

Respondida
How to clear dots in image
How about the following? [X,map] = imread('4.png'); X2 = medfilt2(X); imwrite(X2,map,'output.png');

más de 5 años hace | 0

Respondida
How to condionally keep unique rows in a table
How about the following? idx = (T.e == 2) & (T.f == 3); T_desired = unique(T(idx,:),'rows'); Or, if your original table T has...

más de 5 años hace | 0

| aceptada

Respondida
Best to import and plot one large csv file
How about using "tall array" ? I believe the following pages should be helpful for your task: https://jp.mathworks.com/help/ma...

más de 5 años hace | 0

Respondida
Fill area between plot and the 0-line?
How about using area function? The following is an example: % Sample data x = linspace(0,4*pi,1000); y = sin(x); % Extrac...

más de 5 años hace | 3

| aceptada

Respondida
Finding whether the element of the array is present in the other array and finding the index value
Just in case, let me post an example. If you don't need to think about tolerance, intersect function also works. % Example (de...

más de 5 años hace | 0

Respondida
How to find and color circle in a binary image of circles using sliding window through out the image?
Looking at the original image, target regions are filled with plane color. So I tried to apply the entropyfilt to extract the R...

casi 6 años hace | 1

Cargar más