Answered
How split an image into four parts?
% since I don't have your cell array, I make one up: C = repmat({randi([0 255],224,896)},2,10) % split each matrix in C into 4...

29 dagen ago | 0

| accepted

Answered
How to remove a part of a character?
Date = '1938-03-01'; Date(1:4) = []

29 dagen ago | 0

| accepted

Answered
How can i filter a table with several variables
% an example table with four columns: dt = datetime(2023,1,(1:10).'); A = string(rand(10,1)); B = string(rand(10,1)); C = ra...

29 dagen ago | 0

| accepted

Answered
How to get the 1×1 cell array?
offset = -20; pos = 10; neg = 5; str = {sprintf('m, %g, %g, L -%g, 0 c 0, 0',offset+pos,offset+neg,neg-0.3)}

29 dagen ago | 0

Answered
plotting in 3 for loop's
The reason you don't see any plots coming from this line in the nested 3 for-loops plot(t_vector,RWind,'LineWidth',3) is that ...

29 dagen ago | 0

| accepted

Answered
How to vectorize this piece of code by replacing all the for-loops?
Here is a vectorized code that doesn't have to be modified if you change M or N: th=pi/180; u=[40*th 50*th 60*th 70*th]; b=u;...

29 dagen ago | 1

| accepted

Answered
Sort cell array with matrix
[~,idx] = sort([myCellTest{:,2,:}]; mySortedCellTest = myCellTest(:,:,idx);

30 dagen ago | 0

Answered
How to alter entries in one matrix based on another matrix?
One way: A=[0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 ...

ongeveer een maand ago | 0

| accepted

Answered
How to compare two matrix?
One way: A=[0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 ...

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 3

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 1

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 1

| accepted

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 1

| accepted

Answered
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',...

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 0

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

ongeveer een maand ago | 1

| accepted

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

ongeveer een maand ago | 0

| accepted

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

ongeveer een maand ago | 0

Answered
'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: ...

ongeveer een maand ago | 0

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

ongeveer een maand ago | 1

Answered
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:...

ongeveer een maand ago | 1

| accepted

Load more