Community Profile # Voss

Last seen: Today Active since 2013

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

converting float to integer makes problem
y=round(10*x+1);

37 minutes ago | 0

Matrix dimensions do not match
From pcolor documentation: "pcolor(X,Y,C) specifies the x- and y-coordinates for the vertices. The size of C must match the siz...

3 hours ago | 0

CVX function Error -

3 hours ago | 0

How do I put all my vectors through the same operation?
l = 0.50e-3;%m% % store the vectors Tf1, Tr1, Tf2, ..., Tr9, in a 9x2 cell array % (so that, e.g., what you called Tf6 is no...

3 hours ago | 0

i wanna animate 2 subplots in the same time and each one for different numbers.
% Animation figure NN = numel(Solution); ax = gobjects(1,NN); hh = gobjects(1,NN); for ii = 1:NN ax(ii) = subplot(NN,1...

4 hours ago | 0

Assigning letters to numbers
alphabets = [' ', 'A':'Z']; Map(alphabets) = 0:numel(alphabets)-1;

19 hours ago | 0

| accepted

Index a Y = MxN, with X=Mx5 (where elements in X are column IDs for values to extract from Y)
You can use sub2ind for that. https://www.mathworks.com/help/matlab/ref/sub2ind.html Example: Y = randi(50,6,10) Z = Y/100; ...

1 day ago | 1

| accepted

read csv file and output csv file
You are overwriting k inside the k for-loop: for k = 1:numel(files) filename = fullfile(files(k).folder,files(k).name); ...

2 days ago | 1

I am getting "Array indices must be positive integers or logical values" in my code.
You have created a variable called "factorial", the existence of which prevents you from using the "factorial" function. Run c...

3 days ago | 2

| accepted

Plot multiple cases from data structure at once?
For each participant, load the participant's mat file and plot the EDA data into the next tile of a tiledlayout. % number of pa...

3 days ago | 0

how to find where a value falls in a list
A = [ 1 0 2 0.053 3 0.105 4 0.157 5 0.208 6 0.258 7 0.306 8 0.353 9 0.399 10 0...

3 days ago | 0

| accepted

"Assigning to 2 elements using a simple assignment statement is not supported. Consider using comma-separated list assignment." Error only sometimes happens.
If you have two y-axes, then ax.YAxis is non-scalar, so ax.YAxis.LineWidth = 1.5; gives you an error. Notice that the previou...

4 days ago | 0

Inconsistancy of colorbars across contourf() plots
Use clim() instead of setting the y-limits of the colorbars. https://www.mathworks.com/help/matlab/ref/clim.html X = 1:10; Y ...

4 days ago | 0

| accepted

Concatenating a signal given its segments' limits
ww = [ 10 15 16 22 33 44 45 50 51 60 70 80 ]; N = 1; to_keep = ww(2:end...

5 days ago | 1

| accepted

griddedInterpolant error "Interpolation requires at least two sample points for each grid dimension."
The points (bp1, bp2, bp3) in 3d space do not form a grid. They are equally-spaced points along a line segment from (0,5,2) to (...

6 days ago | 0

export excel from Matlab compiler
The code looks like it will work the same in a compiled executable as it does in (uncompiled) MATLAB. The difference is that th...

6 days ago | 0

On line 53: error = abs(-15 - Theta(i)); . I'm getting an error that says, "Index exceeds the number of array elements. Index must not exceed 17901". what am I doing wrong?
First, let me run the code almost up to where the error happens: clc clear all %Given: M1 = 3; G = 1.4; tot = 180; Theta=...

6 days ago | 0

create empty pie chart (or not generate the graph)
Maybe something like this: matrix_new = []; figure if isempty(matrix_new) % matrix_new is empty: create the circle ...

6 days ago | 0

How to change bacground color of uitreenode?
% remove any existing uistyles from the uitree: removeStyle(app.Tree) % create a new uistyle for Blue Background: s = uisty...

6 days ago | 0

| accepted

Resolution of plot code errors
Use fplot instead of plot: syms x; y=1/sqrt((1-x^2)^2+(2*x)^2); fplot(x,y); xlim([0 5]); ylim([0 4]);

6 days ago | 0

Why does UIaxes handle is deleted when calling a function and taking inputs as UIaxes handle in MATLAB webapp ?
copyUIAxes called with one input creates a new figure, as the comment near the top of copyUIAxes.m states: % COPYUIAXES(uiax) c...

7 days ago | 0

How to Shade area between 3 curves each with different x-axis values?
I guess you want to shade the area between the lowest curve and the highest curve for all x. T = readtable('Book1.xlsx') % c...

9 days ago | 1

| accepted

How do you search for a number in a cell array containing different length arrays?
C = {[2 5 8 9], [1 2 4 5 7 10], [3 5 6 7 8 9 10], [1 2 3 5 8 9 10], [1 2 4 6 8 9], [1 3 4 5 6 8], [1 2 4], [4 5 7 9], [1 2 5 7 1...

9 days ago | 0

While using "hold on" to create a graph with multiple graphs together, the logarithmic scale on x axis is not applied.
One way to fix this is to set the 'XScale' of the axes to 'log' explicitly. pi_1=[1 1 0.643 0.472 0.371 0.297]'; pi_08=[1 1 0....

10 days ago | 0

| accepted

While using "hold on" to create a graph with multiple graphs together, the logarithmic scale on x axis is not applied.
One way to fix this is to put the hold on afer the first semilogx() call. pi_1=[1 1 0.643 0.472 0.371 0.297]'; pi_08=[1 1 0.63...

10 days ago | 0

How to add data to an existing UITable in app designer?
old_data = app.UITable.Data; app.UITable.Data = [old_data; new_data];

10 days ago | 1

Resize and align the data matrix based on the stimuli ID
M = readmatrix('log.csv'); % --- first, identify where the stimuli start and end --- % find indices where 1st column of M ...

11 days ago | 0

| accepted