Community Profile

photo

dpb


Last seen: Today Active since 2012

Statistics

All
  • First Review
  • Master
  • Thankful Level 2
  • 36 Month Streak
  • Revival Level 1
  • Knowledgeable Level 4
  • First Answer
  • Solver

View badges

Content Feed

View by

Answered
How can I add error bars to my scatter plot if I only have a .fig file.
If the figure is the current one, then hAx=gca; % get handle to current axes hold on ...

14 hours ago | 0

| accepted

Answered
How to connect the point of the plot on Matlab?
%figure('Name','Load vs Time') %Also, how can I fix this line so that my figure has a name and all points will appear on a si...

1 day ago | 0

Answered
Fortran code in Matlab
Try adding additional switch to handle the backlash edit descriptor James' keen eyes spotted (I used the DEC DVF/CVF compiler fo...

1 day ago | 0

Answered
Separating datetime data ('yyyy-MM-dd HHmm:ss' Into 'hh:mm:ss')
See doc timeofday NB: When you have an area of functionality but don't know the function name, the "Functions" link at the to...

1 day ago | 0

| accepted

Answered
How do i get the CDF and ICDF functions to accept a variable instead of just numbers.
K>> load D_obj K>> fieldnames(D_obj) ans = 3×1 cell array {'k'} {'n'} {'w'} K>> The field name is lowerca...

2 days ago | 0

Answered
for loop question, how to put the for loop answer in new matrix
A number of issues with the above code -- Don't use line as a variable, it's a builtin important plotting function, size(A) re...

2 days ago | 1

| accepted

Answered
Create a new table by transforming data in existing table with few lines (maybe just one)
The above syntax is for a variable/matrix/array, NOT for a table if a MATLAB table object is, indeed, what you have. We can't t...

2 days ago | 0

Answered
When debugging in R2021b, the current line is highlighted in light green making it impossible to read the line when the text color is light and background is dark.
Under preferences, "Editor/Debugger" the checkbox "Highlight Current Line" has the option to select the highlight color.

3 days ago | 0

Answered
interpolate data in timeseries
v=[0.18 3.15 0.18 0.16 0.17 0.58 0.33 ]; % example data % the engine nI=3; ...

3 days ago | 0

| accepted

Answered
regexprep delete parenthesis in a sentence. not working
It's short enough, I'll repost the working code from previous Answer again... txt=textread('bogar.txt','%s','whitespace','','de...

3 days ago | 0

Answered
delete lines in txt based off phrase
txt=textread('bogar.txt','%s','whitespace','','delimiter',newline); % read file a cellstr array idxHdr=find(contains(txt,'Name'...

3 days ago | 0

Answered
Add random numbess to matrix
If the desire is a bounded, symmetric, continuous distribution that approximates a normal, consider the beta with, eta,gamma equ...

3 days ago | 1

Answered
How can I randomize target positions in a Gaussian distribution?
Z=randn(10,1)*40+80; isOK=all(iswithin(Z,0,160)); while ~isOK % regenerate code here depending on what your definition of "...

4 days ago | 0

| accepted

Answered
How to count number from database
I don't like struct stuff so didn't try to construct it since can't copy an image...but following should provide enough bread cr...

4 days ago | 0

Answered
How to determine the figure window on which subplots are created?
subplot() doesn't allow a figure handle; use the alternate meaning of figure() to set the figure before calling subplot() figur...

5 days ago | 0

| accepted

Answered
How can I insert NaN value in a matrix?
a(iseven(a))=nan; % iseven() is in Signal Processing TB w/o the SP TB, it's not much more a(~mod(a,2))=nan; These a...

5 days ago | 1

| accepted

Answered
Using datetime function - questions on speed and specific time points
OK, I'll take a chance after rereading the Q? again... d0=datetime(["2021-11-29 10:00:00";"2021-11-29 22:15:00";"2021-11-30 08:...

5 days ago | 0

Answered
Change negative values in data
You're almost there, but making it more complicated than needs be... invalidDataIndex=(windTurbineData.mean_Power_kW<0); ...

6 days ago | 1

| accepted

Answered
How to subplot using for loop?
for m=1:10 figure for n=1:8 subplot(2,4,n) plot(MM(:,n,m)); end end The above plots each against the ordi...

6 days ago | 0

Answered
Axis labels - subscripts not working
What does hAx=gca;hAx.YLabel.Interpreter return after the figure? If you get no error message, the above symptoms indicate ...

6 days ago | 1

| accepted

Answered
How to convert timeseries class mat file to excel
It's not bad at all...I let the file download overnight last night and got a few minutes to poke around just now...I was almost ...

9 days ago | 0

| accepted

Answered
Restricting time on graph with given time
Alternatively, simply xlim([datetime(2019,1,1) datetime(2019,1,31)]) will leave all the data plotted but only display that bet...

9 days ago | 1

| accepted

Answered
How to Use the Latex \bm for Math Symbols in ylabel?
Can do in regular text as ylabel('$$\textit{\textbf{X}}$$','Interpreter','latex') I don't think anybody has ever figured out h...

9 days ago | 0

| accepted

Answered
How to convert timeseries class mat file to excel
You've managed to put a timeseries object into a table as a cell. To do anything with it, you've got to dereference it back to ...

10 days ago | 1

Answered
Run TRIM in bath mode, but get Run-time error '62' \n Input past end of file
The above looks like could be much simpler if it is just doing a string substitution on a given line...try something like funct...

10 days ago | 0

Answered
select the correct row in a table with a different index in the for loop
j=1; for i=1:5:1440 j=j+1; ... end

10 days ago | 1

Answered
I have total of 40 years = 40*365 days = 14600 days of rainfall datas. What if I want to represent a total of 40 plots per year, not per day unit?
Use ttP=readtimetable('yourfile'); ttPY=retime(ttP,'yearly','mean'); and magic will happen...

11 days ago | 0

| accepted

Answered
@ Symbol in function handles as an input variable to another function
The issue is given by the requirements of the function integral -- the help file for it reads in part-- >> help integral inte...

11 days ago | 0

Answered
Finding one value in matrix from covariance matrix
There is no solution to the given problem data set -- by definition cov(A) contains the column variances along the diagonal. Yo...

12 days ago | 0

Answered
Retrieving data from Excel in multiple sub folders with different names
There's a lot of structure in those directory names -- you have two choices in how to access them and write the code to do so in...

12 days ago | 0

Load more