Algorithm for a Loop in a Table
Try this: Col1 = repelem(L,4); Col2 = repmat(M',2,1); Col3 = repmat([N(1:2:end),N(2:2:end)]',2,1); Table = [Col1 Col2(:) Col...

4ヶ月 前 | 0

using readtable function except for last five lines from text file
Use your similar method to detect the last line of the valid data and add some import options as follows: for i=1:2 line_check...

4ヶ月 前 | 1

| 採用済み

Find RGB color code in an image
Modify this line by swapping xData & yData c = [R(yData,xData) G(yData,xData) B(yData,xData)];

4ヶ月 前 | 0

| 採用済み

4ヶ月 前 | 0

| 採用済み

Convert text file to Excel file with dates in the correct format?
You may change it to a string format and write to an excel file. clear; clc; T=readtable('FDATA.TXT'); T.Var3=datestr(T.Var3,...

4ヶ月 前 | 0

| 採用済み

Change the dimesion of concatenation of RGB images
Try this: B = permute(A, [1 2 4 3])

4ヶ月 前 | 1

| 採用済み

Remove White border from Image
Try function imcrop

4ヶ月 前 | 0

How can i transfer a specific number in matrix to another number along the solution matrix??
Try this: [value,~]=max(A(logical(x))); A(A==value)=0;

4ヶ月 前 | 0

| 採用済み

find max at each row array in a cell
B=(cell2mat(A')');

4ヶ月 前 | 1

| 採用済み

Help with syntax for a self-made function
You have not define your output variable 'fields' in your function, so nothing returns from the function

4ヶ月 前 | 0

| 採用済み

grouping files together by name
Following code assumes all your png files are inside the working directory and the filename format are xxxx.00.000.png. clear; ...

4ヶ月 前 | 0

I want to make a loop that keeps replacing its own 'S's with SLSRSLS any N number of times
N = 3; k{1} = {'S'}; for r = 1:N k{r+1} = strrep(k{r},{'S'},{'SLSRSLS'}) end Results are k{1}, k{2}, k{3} & k{4}. k{4}...

4ヶ月 前 | 0

| 採用済み

Draw circle and ellipse in matrix
Modify the third line: nx=100; ny=90; domain=ones(ny,nx); [cols rows]=meshgrid(1:nx,1:ny); centerX = 40; centerY = 40 ...

4ヶ月 前 | 0

How to save vectors of different lengths to excel file
Since you are writing the data in a column, so you just need to take the transpose as follows. Noticed that 'velocities' has 8 ...

4ヶ月 前 | 0

| 採用済み

how can a make a loop for a double value in Matlab?
I think it should put into a cell array: EI = cell(1,length(T1.ID)); % Cell array for i = 1:length(T1....

4ヶ月 前 | 0

| 採用済み

How can I update plot title using set function?
You may modify your code based on the following if this is what you want. i = 0; while i < 5 subplot(2,3,i+1) plot(1...

4ヶ月 前 | 0

| 採用済み

files managing (copy, move and write)
In your attached file, there is already a file 'p' inside folder '0.1' and I need to remove this file before running the followi...

4ヶ月 前 | 0

| 採用済み

How to create a stacked bar out of two separate bar charts (Datasets)?
You may try the following code, but noticed that the XTick is not consistent with your data since there are additional dummy dat...

4ヶ月 前 | 0

| 採用済み

comparing column vectors finding maxima element wise
No a single command.....not sure you accept or not. b.*(b>a)+a.*(a>=b)

4ヶ月 前 | 0

| 採用済み

bar graph with non numerical x-axis

4ヶ月 前 | 0

| 採用済み

Trying to get time between each start and stop & total time per day from a text file.
Noticed that row #35 and #36 are both starting time, hence I remove row #35 and try the code as follows: clear; clc; T = readt...

4ヶ月 前 | 0

| 採用済み

Enlarging Data Sets on Plot
Could function stackedplot satisfy your needs? No enlargement on the axis but there is a cursor to report the values on each dat...

4ヶ月 前 | 0

| 採用済み

how to create a sequence of time?
How about the following? It starts from 2019-01-01 00:00:00 to 2019-12-31 23:00:00 with 1 hour interval datetime('2019-01-01')...

4ヶ月 前 | 0

| 採用済み

Perform a calculation using data from multiple tables
Try the following code to see whether it can accommodate into your work: flight = readtable('flight data.xlsx'); distance = re...

4ヶ月 前 | 0

Remake a single file data plot to multiselect file data plot script
Slightly modify your coed as follows: (1) Select multiple files via uigetfile (2) Variable 'full' becomes a cell array now (3...

4ヶ月 前 | 0

| 採用済み

How to reduce the grid size of 3D matrix, (quarter of its original size)
Suppose A is your data where size is (281*321*60), try the following: [Ny,Nx,~] = size(A); idx1 = 1:4:Ny; idx2 = 1:4:Nx; B =...

4ヶ月 前 | 0

| 採用済み

why do i receive Not enough input arguments. Error in modelProjectile (line 7) horizontalVelocity = cosd(launchAngle)* launchVelocity.
You need to provide 2 input arguments like the following: [maxHeight, airTime, horizontalDisplacement] = modelProjectile(123,15...

4ヶ月 前 | 0

how to use setvartype on a table that is already existing
Please refer to the following example without using setvartype. (1) When you create the table, you can create the preset varia...

4ヶ月 前 | 0

printing a table made of 3 arrays
You can write the entire table to excel using the following code: However, please make sure that they are all column vectors an...

4ヶ月 前 | 1

| 採用済み

"Index exceeds matrix dimensions" error during performing RGB channel separation
According to your code shown above, variable I is only a file name in the beginning of the for loop. Have you do imread or some...

4ヶ月 前 | 1

| 採用済み