回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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 ...

2年以上 前 | 1

| 採用済み

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

2年以上 前 | 0

| 採用済み

回答済み
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(...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

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

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 1

| 採用済み

回答済み
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 ...

2年以上 前 | 1

| 採用済み

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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:\...

2年以上 前 | 0

| 採用済み

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

2年以上 前 | 0

| 採用済み

回答済み
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 = ...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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,...

2年以上 前 | 1

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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 = '...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 1

| 採用済み

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

2年以上 前 | 1

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 2

| 採用済み

回答済み
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 ...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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)...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

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

2年以上 前 | 0

| 採用済み

さらに読み込む