답변 있음
Cannot find files or folders matching: 'processed'.
imds = imageDatastore(imagefolder,'IncludeSubfolders',true,'LabelSource','foldernames');

3년 초과 전 | 0

답변 있음
How i can write % for each line in a txt file
writelines("%" + readlines('oc449.txt'), 'Coc449.txt'); % show the contents of the original file: type 'oc449.txt' % check ...

3년 초과 전 | 3

| 수락됨

답변 있음
Storing and comparing values of an equation in loop
I think this is what you're going for. Note that it's not convenient to calculate each f(i) inside the loop, because you'll need...

3년 초과 전 | 0

답변 있음
fscanf read a specific line
Here's an example using three files: n_files = numel(dir('ders*.txt')); % store the number .txt files whose names star...

3년 초과 전 | 0

답변 있음
How do I make line stacked graph like this?
Here's how you can do it with one plot call creating multiple lines: data = [ ... 80 20; 80 30; 100 10; 100...

3년 초과 전 | 1

답변 있음
Hello, how can I do a (for loop) for this equation to find more than one value of the CF ? Specifically, I mean more than one value for (xm)
xm = {-1:4, -5:-2, -2:1}; Nx = numel(xm); CF = zeros(1,Nx); for k = 1:Nx N = numel(xm{k}); CF(k) = Coherence_Fact...

3년 초과 전 | 0

답변 있음
Vector magnitude with colors
As far as I can tell, there is no way to create a quiver plot (or quiver3 plot) with quivers of different colors. One way to ap...

3년 초과 전 | 0

| 수락됨

답변 있음
How to save data in cells to csv in loop
n_chans = size(file.dat, 1); % get number of channels. Should be 120 data = NaN(0,n_chans); % initialize matrix to be wri...

3년 초과 전 | 1

| 수락됨

답변 있음
How to count instances of values in a table?
call_summary = table( ... {'AAPL';'AAPL';'AAPL';'AAPL';'AAPL';'AAPL';'AAPL'}, ... {'12/16/2022';'12/16/2022';'12/09/20...

3년 초과 전 | 0

답변 있음
How can i show multiple errors in one msgbox or errordlg ?
You can store the error messages and pass them to errordlg when you want to report them. For example, let's say you have a scal...

3년 초과 전 | 0

| 수락됨

답변 있음
How do I keep my current group IDs but then add in two other variables that the code needs to consider?
t = readtable('CostaRica_1253.xlsx','VariableNamingRule','preserve'); [G,group_ID] = findgroups(t{:,4}); n_groups = numel(gr...

3년 초과 전 | 0

| 수락됨

답변 있음
I have to output results (z1 and z2) so the minimum value in Z1 I want to find the value in the same index in Z2, they are 4 rows and 9 columns.
% two matrices with the same size: Matrix1 = magic(5) Matrix2 = randi(50,[5 5]) % find the index of the minimum element in ea...

3년 초과 전 | 1

| 수락됨

답변 있음
separate a variable in a struct
I guess that struct is a variable you created, that struct is a cell array, that struct{4,1} is the character vector 'Florbela',...

3년 초과 전 | 0

답변 있음
How to access the specific filed in a structure at each stage of a for loop?
Initial setup (same as what you have): myToken = "NpMoDLCgEVBMZTdPFQHQUOwllVQNHYjz"; s1="locationid=FIPS:"; FIPS_counter=51; ...

3년 초과 전 | 0

답변 있음
Plot 2D contour of z at (x,y) coordinates
load P load xc load rc n_rows = numel(unique(rc)); xcM = reshape(xc,n_rows,[]); rcM = reshape(rc,n_rows,[]); PM = resh...

3년 초과 전 | 0

답변 있음
Skipping bytes in binary file
You can just fread the appropriate number of bytes (i.e., the amount you want to skip). For example: % read 4 double-precision ...

3년 초과 전 | 1

| 수락됨

답변 있음
Preventing Early User Closing of Application
Maybe set the CloseRequestFcn to [] when you want to disable closing the application. Then restore the CloseRequestFcn again whe...

3년 초과 전 | 0

| 수락됨

답변 있음
How to delete max values for every 5 rows
A = [ 1 1 2 2 6 3 12 2 4 5 9 6 14 1 5 1 6 ...

3년 초과 전 | 0

답변 있음
'p%d=%.8f\n',i,c what doess it mean
The part before the first comma ('p%d=%.8f\n') looks like a format specifier, as would be used in sprintf or fprintf. It means: ...

3년 초과 전 | 0

답변 있음
How to read or view vert long matrix in the Command Window?
You can go to Preferences > Command Window and increase the "Number of lines in command window scroll buffer".

3년 초과 전 | 1

답변 있음
multiply desired indexes in for loop
I think this is what you're going for: t = [0.58 , 14.48, 19.91, 21.88, 22.59]; Nt = numel(t); A = zeros(1,Nt); for i = 2:...

3년 초과 전 | 1

| 수락됨

답변 있음
Cell to matrix conversion
a = vertcat(v{:})

3년 초과 전 | 0

답변 있음
Passing variable in function instead of the actual literal number causes problems
n = int32(24) n = floor(n/2) n = floor(n/2) n = floor(n/2) n = floor(n/2) n = floor(n/2) n = floor(n/2) Note that n staye...

3년 초과 전 | 2

답변 있음
Set color of Graph with uisetcolor
I'm not sure which dropdown menu should be linked to the color matrix, so I call it app.DropDown. This assumes the color matrix...

3년 초과 전 | 0

| 수락됨

답변 있음
Error in my code
See: https://www.mathworks.com/help/matlab/matlab_prog/resolve-error-attempt-to-add-variable-to-a-static-workspace.html

3년 초과 전 | 0

답변 있음
Marker on contourf plot
When calling contourf with syntax contourf(Z) (i.e., no X and Y), then the x- and y-coordinates of the contour plot are taken to...

3년 초과 전 | 0

| 수락됨

답변 있음
Changing specific characters in filenames across subfolders
@julian gaviria: To address the problems you ran into: "1. Is not recursive." That's true; however, it is intended to operate ...

3년 초과 전 | 0

| 수락됨

답변 있음
Running 2 counters in 1 for loop simultaneously
i_all = [1 2]; j_all = [0 12]; for idx = 1:numel(i_all) i = i_all(idx); j = j_all(idx); % ... ...

3년 초과 전 | 0

| 수락됨

답변 있음
AppDesigner How do you load a .mat table and refer to its variables
I think the problem is that wdf_c_tr is not a table; rather it is a struct with a field that is the table. Consider: % a table...

3년 초과 전 | 1

| 수락됨

답변 있음
How to solve the error 'Vectors must be the same length.' for voice recorder in app designer
Try this: y = getaudiodata (audioObject); Fs = audioObject.SampleRate; sound(y,Fs); % t = 0:seconds(1/Fs):seconds(dura...

3년 초과 전 | 0

더 보기