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

environ 2 mois ago | 0

| accepted

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

environ 2 mois ago | 0

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

environ 2 mois 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...

environ 2 mois 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...

environ 2 mois 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)';

environ 2 mois 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...

environ 2 mois 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...

environ 2 mois ago | 0

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

2 mois ago | 3

| accepted

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

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

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

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

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

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

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

2 mois 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' , '...

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

2 mois ago | 0

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

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

2 mois 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(...

2 mois ago | 0

Answered
Add object to an image
Like this? % Read background and man image Ibg = imread('img2.jpg'); Iman = imread('img.jpg'); % Adjust man's image size t...

3 mois ago | 2

| accepted

Answered
deleting part of chars
Like this? % Random string with 100 A-Z characters str = char(randi([65 90],1,100)); % Start position (random number betwee...

3 mois ago | 1

| accepted

Answered
Matlabでしりとりをするには
しりとりをするには、少なくとも「単語」「読みの最初の文字」「読みの最後の文字」の3列から成る単語帳が必要になるように思います。さらに、一回使った単語は以降使わないようにするため、既出かどうかを記録するための列もあったほうが良さそうです。 たとえば以下のよ...

3 mois ago | 4

| accepted

Answered
How to plot data as a time series in a figure
How about the following? T = readtable('data.txt','HeaderLines',3,'ReadVariableNames',false); T.Properties.VariableNames = {'T...

3 mois ago | 0

| accepted

Answered
Add missing rows to the table without loop
Like this? % Original table Tbefore = array2table([0 25 12 12 0.08; 0 33 1 1 0.0051],... 'VariableNames',{'time','radius','...

3 mois ago | 0

| accepted

Answered
simple random time series
How about the following? N = [1000 , 500 , 2000 , 300 , 700 , 1000]; % No of samples NI = length(N); y_min = 10 + (60-10)*r...

3 mois ago | 0

Answered
Plotting an array of string as X-axis and an array of numbers as y-axis?
Assuming your data was stored in the attached format, I think there should be at least following 2 solutions: % Read data data...

3 mois ago | 0

Answered
How can I edit a value in multiple text files?
I believe it's better to keep the original files and save the revised files to a different folder. How about the following? In...

3 mois ago | 0

Answered
Adding two arrays of different sizes together evenly without messing cumulative sum.
Based on the question, C should be a cumulative result starting from 0. So, it should be: C = A + linspace(0,B,length(A));

3 mois ago | 0

| accepted

Load more