Community Profile

photo

Voss


Last seen: Today Active since 2013

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Treasure Hunt Participant
  • Master
  • 24 Month Streak
  • Commenter
  • Leader
  • Thankful Level 5
  • Most Accepted 2022
  • Revival Level 4
  • Knowledgeable Level 5
  • Promoter
  • Scholar

View badges

Content Feed

View by

Answered
Having multiple different bins in a histogram that don't overlap
Maybe something like this? sensorVoltage = 5*rand(12,100)%test array - normally i would have voltage data figure('Position',...

3 hours ago | 0

Answered
Operator '>' is not supported for operands of type 'cell'.
T = readtable('T.xlsx'); T.Properties.VariableNames = num2cell(char(64+(1:size(T,2)))) "extract rows +/- 1 where columns T And...

3 hours ago | 0

Answered
An easy way to add the mean to boxplotGroup of Adam Danz?
rng('default') x = {rand(100,4), rand(20,4)*.8, rand(1000,4)+.2}; means = cellfun(@(x)mean(x,1),x,'UniformOutput',false); ...

6 hours ago | 1

| accepted

Answered
Draw the surface of a two variables function
[X,Y] = meshgrid(-1:0.1:1); Z = -X.*exp(-X.*Y) + cos(X); surf(X,Y,Z,'FaceAlpha',0.75) f = @(x,y) log(1+x.^2+y.^2) - (x-1).^2 ...

7 hours ago | 0

Answered
How to export a cell matrix into a MS Excel file
filename = 'test_THRESH_DATA.xlsx'; N = size(THRESH_DATA,1); for ii = 1:N T = table(THRESH_DATA{ii,:}); writetable...

8 hours ago | 1

| accepted

Answered
When I export results to a text file or csv etc, it is written in only one line, how do I make that it appear in columns?
T=table(sigma(:),x(:),res(:),dist(:),k(:),p(:), ... 'VariableNames',{'sigma','x','res','dist','k','p'}); csvFile = 'tabl...

1 day ago | 2

| accepted

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

1 day ago | 0

Answered
CVX function Error -
https://www.mathworks.com/matlabcentral/answers/410534-undefined-function-or-variable-cvx_begin#answer_329024

1 day ago | 0

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

1 day ago | 0

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

1 day ago | 0

| accepted

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

2 days ago | 0

| accepted

Answered
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; ...

2 days ago | 1

| accepted

Answered
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); ...

3 days ago | 1

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

4 days ago | 2

| accepted

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

4 days ago | 0

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

4 days ago | 0

| accepted

Answered
"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...

5 days ago | 0

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

5 days ago | 0

| accepted

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

6 days ago | 1

| accepted

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

7 days ago | 0

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

7 days ago | 0

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

7 days ago | 0

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

7 days ago | 0

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

7 days ago | 0

| accepted

Answered
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]);

7 days ago | 0

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

8 days ago | 0

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

10 days ago | 1

| accepted

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

10 days ago | 0

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

11 days ago | 0

| accepted

Load more