Respondida
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; ...

más de 4 años hace | 0

Respondida
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}...

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

Respondida
bar graph with non numerical x-axis
Try this: bar(categorical(T_Stand_For_Sum.ADBStand),T_Stand_For_Sum.KWH)

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

| aceptada

Respondida
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')...

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

Respondida
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 =...

más de 4 años hace | 0

| aceptada

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

más de 4 años hace | 0

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

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

Respondida
"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...

más de 4 años hace | 1

| aceptada

Respondida
dicominfo returns an error on all dicom files other than one
Below shows some modification based on your code: (1) Variable all_list is going to contain file names only, so that the index ...

más de 4 años hace | 1

| aceptada

Respondida
Legend option and numbering in boxes
Try the following: y1 = [85 83 82 87; 81 79 84 86; 82 81 89 87; 89 85 87 80; 90 91 85 87]; figure(1), b = bar(y1,'stacked');...

más de 4 años hace | 0

| aceptada

Respondida
How To Extract Data from Multiple CSV Files and Run Analysis?
Read files and use readtable to retrieve the data into a cell array. The first row of the csv file contains the headers but rea...

más de 4 años hace | 0

Respondida
How can I visualized the multiple tables read from a for loop in the variable space?
Use cell array instead: variables{i} = table(dataArray);

más de 4 años hace | 0

| aceptada

Respondida
How to store and reuse coefficients in a for loop
The loop of finding the coefficient can be entirely replaced by: new_coeff = permute(f_n_m,[2 3 1]); Noticed that size of new_...

más de 4 años hace | 1

Respondida
Hold on not working in for loop for imshow
It just executing too fast and not able to observe from the screen. You may add a pasue and try to see whether the output is wh...

más de 4 años hace | 0

| aceptada

Respondida
Make a new a directory and save a file in a loop
use the following for saving data into a file. save(fullFileName, 'plotvars'); % plot vars is the variable I want to save

más de 4 años hace | 0

| aceptada

Respondida
What does cyan marker indicate in the editor
Check this: Editor Bookmarks

más de 4 años hace | 2

| aceptada

Respondida
nanmean and mean ( 'omitnan') error
use mean(cell2mat(PAR_1),'omitnan')

más de 4 años hace | 0

| aceptada

Respondida
Finding X,Y coordinates after image rotation
The following code is going to check the coordinates and not replacing your code, so you may need to verify you code based on th...

más de 4 años hace | 0

Cargar más