Answered
8bitカラー画像を4bitに変換することはできますか?
こちらが参考になると思います https://jp.mathworks.com/matlabcentral/answers/356901-bit-4bit-imquantize#answer_281802

1 year ago | 0

Answered
1つのcell内で変数と文字を共存させたい
数字と文字を共存させる場合、最終的には文字型に変えるしか方法はありません。 理由はどんな変数であれデータ型というのがあるからです。 string型かchar型にする必要があると思われます 一例です。 a = 2; b = "変数" + a ...

1 year ago | 1

| accepted

Answered
引数x,yからなる2次元マップから値を返す関数を作成したい
1-D Lookup Table が 該当すると思われます。 Youtube に使用方法書いてあります。 MATLABですと、interp1が該当しますかね。

1 year ago | 0

Answered
関数「image」でx軸ラベル、y軸ラベルを付け加えるときに、0:1:3を使用して上限と下限が3と0になるようにすることはできますか?
こういうことでしょうか? zz=[0 2 4 6; 8 10 12 14; 16 18 20 22]; image(0:1:3,0:1:2,zz) xticks([0 1 2 3]) yticks([0 1 2])

1 year ago | 1

Answered
グラフの一部の拡大図のみ保存したい
x = (1:2:9)'; y = (1:2:9)'; f = figure; ax1 = axes('Position',[0.1 0.1 0.7 0.7]); ax2 = axes('Position',[0.55 0.2 0.2 0.2]);...

1 year ago | 0

| accepted

Answered
cellに格納されたすべての配列にGrad-camを適用する方法
cellfun をご使用ください YourCell = ...  % ここに1000×1のcell配列 net = ... % ここに使用するnet C_map = cellfun(@(x) MyGradCam(net,x),YourC...

1 year ago | 0

| accepted

Answered
射影変換のやり方を知りたい
手前味噌ですが、自分の回答を参考にお答えします https://jp.mathworks.com/matlabcentral/answers/873543-#answer_741633 --- まずは画像を読み込みます I = imread('te...

1 year ago | 1

| accepted

Answered
なめらかなコンター図を作りたい
なんとなく外れ値が原因な気がします contourfの等高線の数を限定してみてはどうでしょうか? figure contourf(peaks) figure contourf(peaks,3)

1 year ago | 1

Answered
3次元配列をフーリエ​変換し、座標ごとの振​幅を取り出すにはどう​すればよいですか?
5×5の cell データを作ります clear,clc,close all; Fs = 1000; t = (0:1/Fs:1-1/Fs)'; f = linspace(10,490,25) for ii = 1:length(f) ...

1 year ago | 0

| accepted

Answered
グラフの座標で指定した範囲をトリミングしたい
axesのオプションで調整が可能だと思われます x = (1:2:9)'; y = (1:2:9)'; 図を作成します f = figure; ax1 = axes('Position',[0.1 0.1 0.7 0.7]); ax2 = ax...

1 year ago | 2

| accepted

Answered
グラフでの座標の最大値、最小値を出すにはどうすればいいですか?
まずデータを作ります clear; clc; close all u1=5*randn(1,10000); u2=randn(1,10000); x1=1/2^0.5*u1+1/2^0.5*u2; x2=1/2^0.5*u1-1/2^0.5*u2...

1 year ago | 1

| accepted

Answered
pspectrum関数で使われている窓関数
カイザーウィンドウが使われています。 他の窓で調整したい場合は、Leakageオプションから設定可能です。 ------------------ 参考: 例: 'Leakage',0 は、漏れを少なくしてスペクトル分解能の低下を最小にします...

1 year ago | 0

| accepted

Answered
画像内ターゲットの長さを出すにはどうすればいいですか?
コメントを見まして、先回の回答と照らし合わせながらお答えします まずはバイナリイメージを散布データに変えられたところから始めます clear; clc; close all データ生成を行います rng default u1=5*randn(1,...

1 year ago | 0

| accepted

Answered
複数のCSVデータをまとめてfigure化し、保存する方法について。
ファイル名が同じため、更新する状態になっていると思われます。 今回ですとnum2strの使用をおすすめします。 for ii = 1:5 a = ['sample',num2str(ii,'%03d'),'.png'] end

1 year ago | 0

Answered
学習曲線において精度の意味
Q1. 学習条件はMATLABの例をそのまま使いました。エポック数を60→100に変更しただけです。 この原因が分からずに悩んでいるのですが何かお分かりでしょうか? A1. エポック数とは、「一つの訓練データを何回繰り返して学習さ...

1 year ago | 1

Answered
画像から1ピクセルの長さを求める精度を上げたい
% 画像読み込み I = imread('hougan.jpeg'); % グレースケール化 I = rgb2gray(I); ここでmeanの方向オプションでどの方向に平均をとるか指定します % 各列の平均輝度値は、方眼の縦線の位置でピークとな...

1 year ago | 1

| accepted

Answered
多次元配列をフーリエ変換し、座標ごとの振幅を取り出すにはどうすればよいですか?
cell型に時系列データを格納すればいけると思います。 C = cell(50,10,2) C2 = cellfun(@length,C,'UniformOutput',false); C2(:,:,1)

1 year ago | 1

| accepted

Answered
MATLAB onlineにて、sound関数を実行した際に音声が出力されません。
こちらご参考ください。 <https://jp.mathworks.com/matlabcentral/answers/590968-matlab-online-sound-soundsc MATLAB Online で sound や soundsc...

1 year ago | 0

Answered
音声ファイル(wav)をcsvファイルに変換する方法
audioreadとwritematrixないしはwritetableをご活用ください。

1 year ago | 0

Answered
音声ファイルを連続でFFTを行い、順次保存するには
まずデータを用意します clc,clear,close all; f = 50:50:500; Fs = 44100; t = (0:1/Fs:3-1/Fs)'; x = sum(sin(2*pi*f.*t),2); そしてFs = 44100...

1 year ago | 0

| accepted

Answered
findpeaksを使って検出されたピークのX値をプロットに加えたい。 I want to add the X values of the peaks on the figure.
text関数をご使用ください data = [25 8 15 5 6 10 10 3 1 20 7]; plot(data) ここで座標を取得します [pks,locs] = findpeaks(data); テキストをプロットしていきます h...

1 year ago | 2

Answered
ファイルが作られるまで待つ方法
returnでループから脱出するといけると思います。 n = 10; cnt = 0; while true cnt = cnt + 1; if cnt == 10 return end fp...

1 year ago | 1

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

1 year ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

1 year ago

Solved


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

1 year ago

Solved


Return area of square
Side of square=input=a Area=output=b

1 year ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

1 year ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

1 year ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

1 year ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

1 year ago

Load more