已回答
Index exceeds the number of array elements. Index must not exceed 101.
The terms x1(i-d_2+1) and x2(i-d_2+1) will cause that error because d_2 is 1.

2 months 前 | 0

已回答
error in the code
The first time this line is encountered: string(j,n)=string(k,n); k is 9, but string only has 3 rows. That's the reason for th...

2 months 前 | 0

已回答
Why do I receive "Too many arguments" error when trying to export data from an app designer table as a .txt file, to a user defined file location?
writetable doesn't return any arguments, so that's what the error message is saying. writetable writes a table to file. save sa...

2 months 前 | 1

| 已接受

已回答
A simple allocation of array places to zero does not work in MATLAB R2020B
One solution is to construct a matrix of indices: KSE(locations(ii)+(-50:50).') = 0;

2 months 前 | 1

| 已接受

已回答
append (not strcat) to combine strings with whitespace (\n)
From here: https://www.mathworks.com/help/matlab/ref/matlab.ui.control.editfield-properties.html#buh_e24-58-Value "If you want...

2 months 前 | 1

已回答
cpsd output vector differs from plotted result
Looks like cpsd with no outputs plots the magnitude, abs(Pxy), rather than the real part, real(Pxy). signalx = randn(2e4,1); s...

2 months 前 | 0

| 已接受

已回答
How to pull out data from cell array, concatenate it, and put into table for varying trials
T = table(); N = numel(Predictors); for ii = 1:N idx = [1:ii-1 ii+1:N]; T.(sprintf('Train_%d',ii)) = vertcat(Predict...

2 months 前 | 0

已回答
How to calculate mean of specified row and column of multiple dataset of structure?
result = mean(cat(3,data.best),3);

2 months 前 | 1

| 已接受

已回答
Vertically Concatenate Data in a Cell array
M = vertcat(Predictors{:});

2 months 前 | 0

| 已接受

已回答
Code not displaying figure
The last end is in the wrong place. Placing it where you have it makes the projection generation and figure creation code part o...

2 months 前 | 0

| 已接受

已回答
How to convert tables into numeric arrays?
C_512 is not a cell array of tables; it is a cell array of cell arrays of tables. % Load the .mat file load('./C_512.mat'); C...

2 months 前 | 0

| 已接受

已回答
Is there a quick function to make an array whose elements are the sum of the row and column numbers?
function out = Fun(n) out = (1:n) + (1:n).'; end

2 months 前 | 0

| 已接受

已回答
Regarding the GUI update to change the slider values.
Assuming app.dropdown is your dropdown component and app.slider is your slider component: if app.dropdown.ValueIndex == 1 ...

2 months 前 | 0

| 已接受

已回答
how can add an text on GUI
f = uifigure(); t = uitextarea(f); str = 'some text'; t.Value = str; https://www.mathworks.com/help/matlab/ref/matlab.ui.c...

2 months 前 | 0

已回答
indexing groups of elements in a vector in a certain way
%matrix A A = [1 1 4 1 5 1 6 1 5 2 6 2 7 2 3 3 4 3 5 3 3 3]; %matrix B B...

2 months 前 | 0

| 已接受

已回答
How can I add a marker to the legend with two x axes?
Interestingly, swapping the order of perr and terr in the legend() call makes both markers show up in the legend. pwa= [NaN;4.2...

2 months 前 | 0

| 已接受

已回答
How to remove the number caused by 'grid on' and How to change the legend mark
w0=300; l1=2*w0; l2=w0^2; k=60; s=tf('s'); r=[0.9,1.2,1.3,1.4,1.8,2.5,3.5]; H=figure; for i=1:numel(r) transfer_func...

2 months 前 | 1

已回答
Two Plotting results one at a time like simulation
Let's say you have these x, y, and Slope variables: x = linspace(0,1,100); y = exp(x/2); Slope = 0.5*y; Then to plot y and S...

2 months 前 | 0

| 已接受

已回答
Running a large array
You can read and process the file in sections, one section at a time, in a loop, by specifying the start and count input argumen...

2 months 前 | 0

已回答
I want to plot same X axis and different Y axis like timing diagram
I don't know what form your variables are in, but here's something: t = 0:0.5:4.5; Vc = [0 1 0 1 0 1 0 1 0]; Vb = [0 0 1 1 0 ...

2 months 前 | 1

已回答
Right now, changing the spinner's value will create a new maze, but the mazes are still 10-by-10. Try running the app to verify this behavior. To fix this, you can use the gr
% Callback function: GridSizeSpinner, NewMazeButton function NewMazeButtonPushed(app, event) % get the spinner's value: ...

2 months 前 | 0

已回答
Adding a column to a UITable and then using it.
app.StimInputTable.Data.Var4 = app.StimInputTable.Data.Var3./app.StimInputTable.Data.Var2; % ^^^^^ you we...

2 months 前 | 0

| 已接受

已回答
I want to write data at the end of every nth line of a text file
str = readlines(filename); str(4:4:end) = str(4:4:end) + "c"; writelines(str,filename) where "filename" is the abso...

2 months 前 | 1

| 已接受

已回答
Questions about the input X of pcolor and contourf.
I interpret the pcolor documentation as saying that a rectangular grid and a parametric grid are separate special cases, so the ...

3 months 前 | 0

已回答
With a ribbon plot, how to make the ribbons go along each matrix row instead of each column?
If you have some leeway on the x- and y-axis tick locations, you can use ribbon with the tranpose of Z and just alter the axis l...

3 months 前 | 2

已回答
Save graphical objects in .mat file for later use
You can use copyobj to copy an existing graphical object (e.g., scatter plot) to another parent (e.g., axes). Here's an example...

3 months 前 | 0

| 已接受

已回答
With a ribbon plot, how to make the ribbons go along each matrix row instead of each column?
Z=[0,1,2,2; 1,2,3,3; 2,3,4,4; 3,4,5,5]; [m,n] = size(Z); Y = (0:m-1).'; X = (0:n-1).'; Original ribbon plot, for reference...

3 months 前 | 1

已回答
How can I make a graph like this for ANOVA 2-Way
The code that constructs bpdata takes the table data for each patient in turn and puts it together into a 2-row matrix with a co...

3 months 前 | 0

| 已接受

已回答
How to programmatically change the command window text size?
s = settings; s.matlab.fonts.codefont.Size.PersonalValue = 16;

3 months 前 | 1

已回答
agrupacion de datos de una tabla
% first, I construct a table similar to yours N = 152709; MeasID = cellstr(char(64+randi(26,N,4))); Time = datetime(randi(30,...

3 months 前 | 0

| 已接受

加载更多