photo

Voss


Last seen: Today Con actividad desde 2013

Followers: 7   Following: 0

Mensaje

Estadística

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

Ver insignias

Feeds

Ver por

Respondida
loop plot add text to only one specific plot year
If I understand the task correctly, you can use an if condition to create the text object only when datedata is 2020 or 2021. E...

3 días hace | 0

| aceptada

Respondida
Can not use arrays of ui components in app desiger
One thing you can do is construct the array of components in the app's startupFcn, e.g.: N = 64; app.MemValue = gobjects(1,N);...

3 días hace | 2

Respondida
join rows in a cell matrix with the row above
Something like this may work on your files (if not, upload a sample file using the paperclip button): file_in = 'input.txt'; f...

3 días hace | 0

Respondida
Disabling integer overflow capping for uint8 datatypes
I don't think you can disable integer overflow capping, but you could of course perform the operations on corresponding floating...

4 días hace | 0

Respondida
Index in position 1 is invalid. Array indices must be positive integers or logical values.
At least one element of y is not a positive integer so can't be used as an index in image_matrix.

4 días hace | 0

Respondida
Identify when a exceedance occurs and return the start point and length of each exceedance
One way is to use strfind to find the starts and ends of the sections where hdgdelta>=6: hdg1=[10;10;10;10;10;10;10;10;10;10;10...

4 días hace | 0

Respondida
Running a loop of inputting tables into MatLab
First generate the file names. Since you know it's trials 5-40, you can do this: filenames = "/Volumes/usb/table_" + (5:40) + "...

4 días hace | 0

| aceptada

Respondida
I'm confused about how to determine the delimiter between columns for data like this
Use fixedWidthImportOptions, e.g.: opts = detectImportOptions(filename,'FileType','fixedwidth'); % modify opts as necess...

5 días hace | 0

| aceptada

Respondida
Parsing and editing txt file line by line
filename_in = 'test.txt'; filename_out = 'test_out.txt'; % show the input file's content, for reference type(filename_in) ...

5 días hace | 0

| aceptada

Respondida
MATLAB not indexing table with correct data type, how to specify data type when indexing table?
Setting 'TextType' is for specifying whether the data readtable imports as text should be returned as string arrays or character...

5 días hace | 1

| aceptada

Respondida
How to compare values between two NxM matrices
discrepancy_columns = find(any(altitude_data<DEM_data,1));

6 días hace | 0

| aceptada

Respondida
I want show ylabel like 36m, 38m, 40m on plot I have variable population, plz help
P_0 = 1e6; % Initial population (1 million) r = 0.02; % Annual growth rate (2%) t = 0:0.1:50; % Time in years from 0 to 50 ...

6 días hace | 0

| aceptada

Respondida
Find index of a nearest value
x = [1 2 3 4 5 6 11 15 21 51 52 54 100 101 151 201 251 301 401]; target = [10, 20, 50, 100, 150, 200, 250, 300, 400]; [~,idx...

7 días hace | 1

Respondida
How to interpolate values given a starting and end point
xl = [18.2, 17.9]; yl = [50.6, 50.3]; real_values = (recordings-xl(1))./(xl(2)-xl(1)).*(yl(2)-yl(1))+yl(1);

10 días hace | 0

Respondida
Unable to Add Legend to Plot
Looks like you have a script called "legend.m" (located in "\\filepath\filepathxxxx") which is conflicting with running the buil...

10 días hace | 0

| aceptada

Respondida
Unrecognized function or variable 'START_GUI'.
Did you set the current MATLAB directory to the location of the AnaSP files? https://www.youtube.com/watch?v=ZqANSYfMnss&t=35s

11 días hace | 0

Respondida
Concatenate name fields in nested structure
S = struct( ... 'A1',1, ... 'A2',struct('B1',2,'not_data',3,'data',4), ... 'A3',struct( ... 'B1',struct(...

11 días hace | 1

| aceptada

Respondida
The maximum value is not changing even after adding 1
x0_test is an array of unsigned 8-bit integers load data class(x0_test) The minimum value an 8-bit unsigned integer can have ...

11 días hace | 1

| aceptada

Respondida
writestruct() fails to write empty child element to XML file
s.elementA = 14; s.elementB.child = struct(); writestruct(s,'test.xml','StructNodeName','Problem') type('test.xml')

12 días hace | 0

| aceptada

Respondida
The perpendicular point is not on the proposed line.
The second calculation (which is for the green line) is using the slope from the first calculation (which is for the blue line) ...

12 días hace | 0

Respondida
Readtable Delimiters on two similar files gives differing result
One problem seems to be that the date/time line in the header has 3 commas in it, which for file B causes readtable to try to tr...

12 días hace | 0

| aceptada

Respondida
ERROR: Error using {} Variable index exceeds table dimensions. How to apply function to all cells/tables?
It looks like this code was written expecting results_velocity_diff to be a cell array of cell arrays of tables, but in fact res...

13 días hace | 1

| aceptada

Respondida
How to detect a data value change in matlab
DATA = [ 0 0 0 0.1224 0.1219 0.1199 0.1199 0.1199 0.1175 0.1175 0.1175 ...

13 días hace | 0

| aceptada

Respondida
Plotting multiple lines with a for loop: only last plot shows
Remove legend(p(i)) from inside the for loop. Replace the legend after the for loop with legend(p(t)).

13 días hace | 0

| aceptada

Respondida
I want to calculate velocity. How do I apply my code to all tables in all cells?
load('results_distances.mat') results_distances is of size 3x12 results_distances so its length is 12. Recall that length() r...

13 días hace | 1

| aceptada

Respondida
I want to calculate distances in 3D space. How do I apply my code to all tables in all cells?
results_nooutliers is not a cell array of tables, but rather a cell array of cell arrays of tables. load('results_nooutliers.ma...

14 días hace | 0

| aceptada

Respondida
X-Axis Boxplot Shift
% random data N = 100; x = randn(N,1); cats = categorical(randi(2,N,1),[1 2],{'None','LF'}); % create the box plot figure...

14 días hace | 0

| aceptada

Respondida
difference between 2 values in a vector
x = [0.2 0.0 0.0 0.0 0.25 0.0 0.0 0.0 0.3 0.0 0.0 0.4 0.0 0.0 0.0 0.1 0.0 ...

14 días hace | 0

Respondida
average between cell arrays of doubles
C_mean = cellfun(@(c)mean(cat(3,c{:}),3),C,'UniformOutput',false);

14 días hace | 0

| aceptada

Cargar más