Community Profile

photo

Voss


Last seen: Today Con actividad desde 2013

Estadísticas

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

Ver insignias

Content Feed

Ver por

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

alrededor de 12 horas hace | 0

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

alrededor de 14 horas hace | 0

| aceptada

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

alrededor de 16 horas hace | 1

| aceptada

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

1 día hace | 0

| aceptada

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

1 día hace | 0

| aceptada

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

1 día hace | 1

| aceptada

Respondida
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 días hace | 1

| aceptada

Respondida
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 días hace | 0

| aceptada

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

3 días hace | 0

| aceptada

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

3 días hace | 2

| aceptada

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

3 días hace | 0

| aceptada

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

3 días hace | 0

| aceptada

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

3 días hace | 0

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

3 días hace | 0

| aceptada

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

4 días hace | 0

| aceptada

Respondida
classify "rows" of numbers contained in different arrays
'some unique rows are actually duplicate, i.e. row "1 2" is equivalent to "2 1", or row "1 3" is equivalent to "3 1"' If it is ...

4 días hace | 1

Respondida
live data plotting in app designer.
What you have now is plot(app.UIAxes,app.t,app.y,'bs'); which plots blue squares at the points given by (app.t,app.y). If you...

4 días hace | 0

Respondida
Find the first appearance of a number in a row.
A = [0 0 0 2095 2030 0 2030 2030 2030 2030 0 0 2095 2055 2065 2065 2055 2050 2030 2030] ...

4 días hace | 0

| aceptada

Respondida
problem to apply variableNames to table
You have to set the ColumnName of the uitable separately, if you want to do that: app.Preset_UITable.ColumnName = bubu.Properti...

4 días hace | 0

| aceptada

Respondida
How do I find out a struct is empty?
It looks like you want to find out whether a struct has any fields or not, for which you can use isempty(fieldnames(A)) A = str...

4 días hace | 0

| aceptada

Respondida
processing a file but keeping blank lines intact
Here's one way: input_file = 'file.txt'; output_file = 'file_modified.txt'; constant_offset = 100; input_format = "%f,%f...

5 días hace | 0

| aceptada

Respondida
Assign different values per column using logical indexing
matrix = magic(5); % data matrix boundary_conditions = [10, 100]; % boundary conditions disp(matrix); % using logical index...

5 días hace | 1

| aceptada

Respondida
Read text without converting to date
Try using readcell or readtable. file = 'test.csv'; % show file contents: type(file) % read file into a cell array C: C =...

5 días hace | 0

Respondida
Figure not showing anything
Runs for me (see below). Do you get any error messages on the command line when you try to run it? unzip wine.zip load wine....

5 días hace | 0

| aceptada

Respondida
Help with undefined function error in context menu in App Designer?
Use "@app.Line1" and "@app.Line2" instead of "@Line1" and "@Line2", since those functions are app methods. See below: classdef...

5 días hace | 0

| aceptada

Respondida
Scaling Y-Axis by natural log scale.
log10 scale is the same as natural log scale is the same as log2 scale is the same as log-any-base scale. Logarithmic scale mea...

5 días hace | 0

| aceptada

Respondida
Find least frequent value in an array
H = [1 1 2 2 3 3 4 5 5 5]; [uu,ii] = unique(sort(H(:))); [~,idx] = min(diff([ii; numel(H)+1])); result = uu(idx) % another...

5 días hace | 0

Respondida
Apply "Figure Copy Template" within m file code
Here's some code that programmatically applies the default Presentation settings (Change font size to 140% of original, Bold, Se...

5 días hace | 1

Respondida
Select only those nodes of an rx3 matrix placed at a distance 'd' from a node P (1x3)
load M figure plot3(M(:,1),M(:,2),M(:,3),'r.') view(2) % keep only points whose x-coordinate is less than 28: idx = M(:,1) ...

5 días hace | 0

| aceptada

Respondida
Loop with Time series
You can use the month and year functions, along with findgroups, to group the timetable by year and month. Then splitapply to pe...

5 días hace | 0

Cargar más