Community Profile

photo

Akira Agata


MathWorks

566 total contributions since 2016

Contact

Akira Agata's Badges

  • Personal Best Downloads Level 2
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 3
  • First Submission
  • 24 Month Streak
  • Guiding Light
  • Knowledgeable Level 4
  • Solver
  • Revival Level 2
  • First Answer

View details...

Contributions in
View by

Answered
Changing gregorian date number to calendar date and time
If your time vector represents hours since 1900-01-01 00:00:00.0 , following code can convert it into yyyy-MM-dd. T = datetime...

2 jours ago | 1

| accepted

Answered
特定の文字を抽出してプログラムを制御する方法と、テーブルに複数の単語を格納する方法についてご教授お願いいたします。
前回に引き続き、ちょっと面白そうなので少し考えてみました。 ざっと以下のようなプログラムになるかと思います。 ご質問の2点については、コメント欄に「★」をつけた部分になります。参考になれば幸いです。 % テーブルd(ictionary)の作成 T_...

2 jours ago | 0

Answered
Axes上に表示した画像を傾けたい
axesオブジェクトで、図の真上方向を示す CameraUpVector プロパティを回転させるのはいかがでしょうか? ちなみに、2次元表示での CameraUpVector プロパティのデフォルト値は [0 1 0] ですが、imshowで画像を表示し...

2 jours ago | 1

Answered
how to generate two random binary images with remove overlapping ?
OK, maybe I could understand your intention. How about the following way? nRow = 5; nCol = 4; while true % Prepare a bl...

2 jours ago | 1

| accepted

Answered
How to read data after a specific word from txt file?
If your MATLAB is R2019a or later, you can use readcell function. Also, by using indexing technique, you can do your task faste...

3 jours ago | 0

Answered
How to make this surface?
Straight-foward solution would be like this: x = linspace(0,5); y = linspace(0,2); [xGrid, yGrid] = meshgrid(x,y); zGrid =...

3 jours ago | 0

Answered
How to swap array element from two arrays conditionally
By using indexing technique, you can simply do this kind of task. The following is an example: % Original matrixes A = [... ...

3 jours ago | 1

| accepted

Answered
figureの複製方法について
copyobj関数が使えるかと思います。 以下は簡単なサンプルコードです。 x = linspace(0,4*pi); figure plot(x,sin(x)) ax = gca; hFig = figure; copyobj(ax...

4 jours ago | 3

| accepted

Answered
How can i load .mat files from subfolders with for loop?
How about using dir function? Using the function, the solution would be like this: fileList = dir('C:\Users\**\*.mat'); for...

5 jours ago | 0

Answered
Rearrange time and turn it into Julian time
How about the following? % Read the csv file D = dlmread('h172.csv'); % Generate datetime vector Time = datetime(D(:,1),D(...

6 jours ago | 0

Answered
how to save digital output
How about using writematrix function? writematrix(a,'a_out.txt','Delimiter',' ');

10 jours ago | 0

Answered
XY plot data interactively
How about using animatedline function? The following is an example: h = animatedline('LineStyle','none','Marker','o'); axis([...

10 jours ago | 0

Answered
How do I make a different shape like a hexagon or triangle using image processing?
If you want to create regulay polygon shape image, how about using nsidedpoly function? The folloing is an example: % Create h...

10 jours ago | 0

Answered
How to draw the tangent to a curve passing through the origin
Assuming that you want to obtain tangent lines which pass through the (-110,0), how about the following? In this code, I change...

10 jours ago | 0

| accepted

Answered
How to generate a matrix of variables with continous values?
How about using reshape function? The following is an example: x = 1:100; P = reshape(x,10,10)';

11 jours ago | 0

Answered
how to put border on the image over top and bottom
Assuming "imagea.jpg" and "imageb.jpg" have the same size, how about the following? a = imread('imagea.jpg'); b = imread('ima...

12 jours ago | 0

Answered
How can I make diamond shape with a matrix?
How about the following? N = 5; % <- Should be odd number A = repmat([1 2;3 4],N); se = strel('diamond',floor(N/2)); idx = i...

12 jours ago | 0

Answered
AlexNet、層の深さ
厳密には、どの層の数をカウントするかによって変わってきますが、「AlexNet:8層、GoogleNet:22層」といわれるときには「畳み込み層」と「全結合層」の合計数を指しています。 AlexNet:畳み込み層×5+全結合層×3=8層 GoogL...

17 jours ago | 3

| accepted

Answered
複数のファイル読み込み
あるいは、ファイルが大量にあるようでしたら以下の方法ではいかがでしょうか。 % カレントフォルダにある .tifファイル一覧を作成 s = dir('*.tif'); s = struct2table(s); % 末尾が _2.tif ~ _4...

17 jours ago | 2

| accepted

Answered
The splitting text contains file into separate columns
How about the following? % Read txt file fid = fopen('data1.txt','r'); strData = textscan(fid,'%s','Delimiter','\r\n'); strD...

19 jours ago | 1

| accepted

Answered
How do I create a 3 dimensional response surface plot from X Y Z points ?
How about using an interpolation? The following is a simple example: % Apply cubic interpolation [xGrid,yGrid] = meshgrid(lin...

20 jours ago | 0

| accepted

Answered
Create a cumulative sum under certain conditions
How about the following? % Sample data days = repelem((1:10)',10,1); names = repmat(['A':'J']',10,1); output = randi(100,100...

20 jours ago | 0

Answered
Find the list of edges between 2 nodes
How about the following? tail = [1 2 2 4 5 3]; head = [2 4 5 3 3 6]; % Create graph object G = graph(head,tail); % Find...

24 jours ago | 0

Answered
How to increase elements of a vector, of different size, without changing its plot?
OK. Then, I would recommend converting your data into timetable, and applying synchronize and/or retime function. The followin...

25 jours ago | 1

| accepted

Answered
Spiting Cell Array into Different Delimiter Numbers
How about the following? % Example of the input array Act = repmat({'Dive';'Run';'Walk'},4,1); uniqueAct = unique(Act); Co...

26 jours ago | 0

| accepted

Answered
search for a word in a string with complete match
How about the following way? StringText = 'High rotation speed changes the parameter RevolutionChange'; WordCell = {'Slip' , '...

26 jours ago | 1

| accepted

Answered
Matrix rows and columns swapping
I don't think rows and column can be randomly changed simultaneously. There should be at least 2 steps, like this: % Input 3-b...

26 jours ago | 0

Answered
3Dグラフについて
元データであるExcelファイルの各行のデータを、表示している表面プロット上に点として表示するのはいかがでしょうか? figure surf(X,Y,Z) hold on scatter3(x,y,z,'ro')

26 jours ago | 0

| accepted

Answered
Finding Closed area in a region
By using polyshape, simplify and regions functions, you can obtain polyshape object for each closed area. The following is an ex...

27 jours ago | 0

Answered
Vary the thickness of plot
How about using daspect function? The following is an example. d1 = rand(1,10); d2 = rand(1,10)*10; figure ax1 = subplot(...

27 jours ago | 0

Load more