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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 2

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

Mehr laden