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

casi 3 años hace | 0

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

casi 3 años hace | 0

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

casi 3 años hace | 1

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 1

| aceptada

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

casi 3 años hace | 1

| aceptada

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

casi 3 años hace | 0

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 1

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 1

| aceptada

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

casi 3 años hace | 1

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 2

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

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

casi 3 años hace | 0

| aceptada

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

casi 3 años hace | 0

| aceptada

Cargar más