Réponse apportée
password field is not taking input
The following threads may have workarounds that work for you: https://www.mathworks.com/matlabcentral/answers/1456459-can-t-ent...

presque 3 ans il y a | 0

Réponse apportée
Extracting Specific Rows From xlsx or txt File
Here's one way. This method reads the file's contents into a cell array using readcell. The data on lines 14:3:end of the file e...

presque 3 ans il y a | 0

Réponse apportée
Why won't my plot work? (not elementwise issue)
The T values are around 2000 to 3500 but the ylim was set to [0 4]. I changed the ylim to [0 4000]. format compact clear all ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Read data with repeat counts
str = fileread('file.txt') C = regexp(regexp(str,'\s+','split'),'\*','split'); idx = cellfun(@isscalar,C); C(idx) = cellfun(@...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
identify a factor that links two equal matrices but positioned in different places on the same plane
load RC_matlab load RC_trasl % calculate the centroid of each set of points: c_matlab = mean(RC_matlab,1); c_trasl = mean(...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
xticklabel in the midle of the spectrogram
Something like this maybe: % some plot plot(rand(1,1000)); % some file names: name = {'a wav file.wav','another wav file.w...

presque 3 ans il y a | 0

Réponse apportée
creating smaller matrix from a large matrix
M = randi(10,16,16); % 16-by-16 matrix of integers between 1 and 10 disp(M); siz = [4 4]; % size of smaller matrices to di...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Simple Vector Indexing Question
M = rand(6000,5); rows = [ 540 1238 1423 2144 2403 3280 3485 4385 4573 5152]; idx = arrayfun(@c...

presque 3 ans il y a | 0

Réponse apportée
how to get value for each loop?
% ... Y = 5; N = 6; repeat = 5; i = 0; % a vector to store the total scores: total_scores = []; while repeat == Y...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Remove datetime values from a table
"I want to remove all dates from file2.Var3 that does not exist in file1.Var3" I assume you mean to remove the rows from the ta...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
extract a row of 2D array based on constant 2D array values
A = [90 10 21; 90 20 21; 90 30 21; 90 40 22; 90 50 21; 88 10 20; 88 20 20; 88 30 24; 88 40 22; 88 50 21; 86 10 20; 86 20 21; 86 ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
export a uitable with backgound color
"Warning: UI components will not be included in the output. To include UI components, use the 'exportapp' function." Did you tr...

presque 3 ans il y a | 0

Réponse apportée
Why does the context menu not appear when right-clicking a node in a checked box tree?
uitreenodes each can have their own uicontextmenus, so you need to associate the context menu with the nodes rather than with th...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Access values in cell array in each loop.
load array_TT_cell for iter = [1 2] fB = cellfun(@(x)x.fB(iter),array_TT); disp(sprintf('Iteration %d:\...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to reproduce axis labeling for given bar3 plot
Something like this: log4=[0.769651681808561,0.00850658785134913,0.00264356326264210,-0.00202871267443307,-0.00288250568612709,...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Reshape 3D matrix with different wanted 2D matrix rows to a 2D matrix of the same row height
Something like this? A = cat(3,[1 2 3;4 5 6;7 8 9;0 0 0],[10 11 12;0 0 0;0 0 0;0 0 0],[13 14 15;16 17 18;0 0 0;0 0 0]); B = ...

presque 3 ans il y a | 0

Réponse apportée
semilog x in boundedline doesn't work
The problem is the 0 in your x vector. Non-positive numbers cannot be represented on log scale. (Specifically, log(0) is negativ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
interpolation of coordinates in space using interp3
interp3 is for interpolating a function of 3 variables, i.e., if you had a function f(X,Y,Z) that returns a value for each (X,Y,...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
resize and fill the matrix
Try this. It looks for stimulus data (a contiguous section with 2's in column 2), and takes 60 rows before the start and 40 rows...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Add numbers to the matrix
Here's one way: stim_column = 2; trial_column = 3; prestim_value = 1; stim_value = 2; poststim_value = 3; input_file = '...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Index exceeds the number of array elements (10)
Avoid naming your variable var, since that is the name of a function you are trying to use. Also, a cell array doesn't appear to...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
small numbers in the legend
The default text interpreter, tex, is interpreting the underscores as subscripts, so you can either: (1) escape the underscores...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Timer not working in my programmatic app (not app designer)
First, line 25: %update_timer = data.update_timer; needs to be uncommented for that error to happen (otherwise you get a diffe...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Help in plotting a graph
% some data: f = linspace(0.03,0.09,100); % row vector (1xn) x = [-1/0.06*(f-0.06)-12; 25*exp(-40*(f-0.03))-10; 1-(f-0.09)/0.0...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Transparent shapes are not transparent to each other
Using the 'painters' Renderer fixes the problem: fg = figure(1); clf; fg.Renderer = 'painters'; set(fg,'Units','centimete...

presque 3 ans il y a | 2

| A accepté

Réponse apportée
Plotting of colormap for single value in x axis and multiple values in y axis
Something like this? The only change is to set xlim(t([1 end])), i.e., let the x-limits span the entire t vector. t = 0:10; y ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
create the complete outline of a pie chart characterized by values ​​<1%
Here's one way (adding a separate call to line to create the circular outline): MMM = [1, 0.33]; labels = MMM(:,1); percentag...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Create an array with only the increasing values of a pressure time series.
This? load DATA plot(a) idx = diff(a) <= 0; while any(idx) a([false; idx]) = []; idx = diff(a) <= 0; end plot(a)...

presque 3 ans il y a | 0

Réponse apportée
Using cumulative areas as an error threshold
You can use cumsum to perform the cumulative sum over all dr at once. Then loop over sections of that cumulative sum, finding th...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Changing color in matlab
im = imread('xyz_converted.png'); im(:,:,[1 2]) = im(:,:,[2 1]); % swap the Red and Green channels imshow(im)

presque 3 ans il y a | 0

| A accepté

Charger plus