Community Profile

# Akira Agata

### MathWorks

Last seen: Today Attivo dal 2016

All

#### Content Feed

Visto da

Risposto
Finding indices of certain numbers from simulation data
How about using ismembertol function? The following is an example: x = [1, 1/3, 3/4, 4/5, 1, 1.1]; idx = ismembertol(x, 0.33,...

22 giorni fa | 0

Risposto

circa un mese fa | 0

| accettato

Risposto
rename files in a folder
How about the following solution? % Create list of all files in the current folder s = dir(pwd); s = struct2table(s); % Ex...

circa un mese fa | 1

| accettato

Risposto
Help on creating a new column and fill values at specific locations
How about the following? % Example v1 = 1:4; v2 = [3, 6, 8, 10]; v3 = 1:10; % Create the new vector newVec = zeros(size(...

circa un mese fa | 0

| accettato

Risposto
how to remove the cracks on image?
How about using inpaintCoherent or inpaintExemplar function?

circa un mese fa | 0

Risposto
Marker on contourf plot
Please use (x,y) coordinate for plotting markers. The following is an example: load('Test.mat'); % Find (x,y) coordinate of...

3 mesi fa | 1

Risposto
Create logarithmically spaced vector with points spaced more closely at far end of vector
Like this? % Normal log-spaced vector x1 = logspace(1, 2, 10); % Create inverse log space delta = diff(x1); delta = flipl...

4 mesi fa | 1

| accettato

Risposto
How can I change the Nan values in a matrix by the values in cells array?
If you want to replace NaN by the given value in linear index order, the following will be one possible solution: % Given matri...

5 mesi fa | 1

Risposto

コメントありがとうございます。 方眼幅のピクセル数を自動的に算出したいとのことですが、以下の方法はいかがでしょうか？ ちなみに、今回のケースは方眼が白色の線ですので平均輝度値のピークを検出していますが、黒線の場合には平均輝度値に -1 を乗算してピーク...

5 mesi fa | 2

| accettato

Risposto
バイナリ画像における水平方向の白領域の広がりを測定したいです。
regionprops で重心を計算する際に、あわせて Bounding Box を計算しておいて、そのボックスの幅を「体領域における水平方向の幅」と見なせないでしょうか？ % 重心の描写 % s = regionprops(binary1,'cent...

5 mesi fa | 2

| accettato

Risposto

5 mesi fa | 1

| accettato

Risposto
How to obtain the outermost elements of a 2D matrix ?
How about the following? % Sample matrix M = magic(5); % Replace non-outermost element as NaN M(2:end-1, 2:end-1) = nan; ...

6 mesi fa | 2

| accettato

Risposto
Rawデータをjpgに変換したいです

6 mesi fa | 1

| accettato

Risposto

6 mesi fa | 1

| accettato

Risposto
エラーバーを任意の点だけ表示する方法はありませんか
plot と errorbar を同じ色で重ねて表示する方法はいかがでしょうか？ たとえば 25個の (x,y) データがあり、5, 10, 15, 20番目のデータのみにエラーバーを表示したいとすると、以下のようになります。 % データ x = 1...

6 mesi fa | 0

| accettato

Risposto
saving 3 dimensional data in excel file in a particular format
How about the following? for kk = 1:5 writematrix(squeeze(A(kk,:,:)), "yourExcel.xlsx", "Sheet", kk); end

6 mesi fa | 1

| accettato

Risposto
x, yの実験データに対し、x,yを両辺に複数もつ複雑な理論式（x,yを変数とし、未知の係数を含む関数）によってフィッティングする方法を教えてください。
いくつかやり方がありますが、たとえば (x, y) の全データに対する左辺と右辺の差の二乗和を「 (a, b) を入力変数とする関数」として定義して、fminsearch で (a, b) の最適値を求めるというのはいかがでしょうか？

6 mesi fa | 0

Risposto
Using load for different files with varying names
How about the following? for kk = 1:25 fileName = sprintf('data%d.mat', kk); load(fileName) % % Some proce...

7 mesi fa | 1

| accettato

Risposto

いろいろなやり方があると思いますが、たとえばMATLABの基本関数のみを使う以下の方法はいかがでしょうか？ % 初期配列 J = repmat(6.5, 710, 710); % 中心 (335, 335), 半径 135 の円内のグリッド点を示...

7 mesi fa | 3

| accettato

Risposto
Find value based on adjacent value condition and insert into new variable
ismember function will be helpful for this task, like: % Sample matrix A = [(0:50)', rand(51,1)]; % Second matrix with inde...

7 mesi fa | 1

| accettato

Risposto
Rename a lot of files
How about the following? fileList = dir('*.csv'); for kk = 1:numel(fileList) fileNum = extractBetween(fileList(kk).name,'...

7 mesi fa | 1

Risposto
Trying to plot a temperature distribution and generate a temperature contourn!
How about the following? L = 1; W = 1; [xGrid, yGrid] = meshgrid(0:0.025:1, 0:0.025:1); T = zeros(size(xGrid)); for n =...

7 mesi fa | 2

| accettato

Risposto
How to find the midpoint between two curves in an image

8 mesi fa | 1

| accettato

Risposto
I need to repeat numbers in an array with a certain number of repetitions for each value without(repelem or repmat)
I'm not sure why you do not prefer repelem/repmat... Anyway, how about the following solution? % Example list_1 = [2;3;5;6]; ...

8 mesi fa | 2

| accettato

Risposto
Trouble using split function in matlab
How about the following? % Example dates = {'3/11/9102'; '3/12/9102'; '3/13/9102'; '3/14/9102'; '3/15/9102'}; % Split by '/...

8 mesi fa | 2

| accettato

Risposto
Find the missing rows and newly added rows in two different excels sheets

8 mesi fa | 2

| accettato

Risposto
MPR-CTを読み込んで3Dとし、一部を球近似することはできますか？
MPR-CT画像から既に 3D モデルは作成済みだと想定します。 3D モデルが 3次元のバイナリイメージの形で利用可能だとすると、regionprops3 関数を使ってそれぞれの重心座標を算出できます。また、この関数でボリュームサイズも取得できますので...

9 mesi fa | 0

Risposto
Average of every 25 rows in a table
Another possible solution: % Sample data data = rand(1000, 10); % Grouping group = repelem(1:size(data, 1)/25, 25)'; % ...

9 mesi fa | 1

Risposto
ベクトルと平面のなす角の算出

11 mesi fa | 2

Risposto
Storing values in a matrix out of nested for loops
how about the following? m1 = [0.5; 0.5]; m2 = [0.6; 0.4]; m3 = [0.2; 0.8]; [q, p, r] = meshgrid(m2, m1, m3); s4 = p.*q.*r;...

11 mesi fa | 1

| accettato