Community Profile

photo

dpb


Last seen: Today
4,392 total contributions since 2012

Contact

dpb's Badges

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

View details...

Contributions in
View by

Answered
Make entries of first row and column of matrix all equal to zero.
Modestly different approach... N=10; M(2:N,2:N)=randi([0 1],N-1); M(1:N+1:end)=0;

3 hours ago | 0

Answered
how to plot to get four plots of descriptive statistics in one figure
You haven't kep the underlying data in the summary statistics so can't do the histogram from those statistics alone. It's simpl...

5 hours ago | 0

Answered
Create an Array with zeroes and sevens
function charge=chargeprofile(start,chargetime,kW) % return charging profile for half hour increments over 24-hr day % given s...

6 hours ago | 0

Answered
Performing operations on non-uniform data
t=timetable(datetime(final_data(:,1),'ConvertFrom','posixtime'),final_data(:,2)); % build timetable t20=retime(t,'regular','ne...

1 day ago | 1

Answered
Changing properties of several lines in a plot containing hundreds of lines
Save the line handles when you plot... [T,X]=odexx(...) hL=plot(T,X); ix=find(X(end,:)>0.01); set(hL(ix),'LineWidth',2) ...

1 day ago | 1

| accepted

Answered
How to read a binary file with below description?
Well, one can take a stab at it assuming is compatible w/ most common desktop architecture at the moment and see if it works or ...

2 days ago | 0

Question


Save Open State in Editor???
Is there no preferences option to have editor reload previous state w/o having to open each and every file again? Very rude beh...

2 days ago | 1 answer | 0

1

answer

Answered
How to convert each row in a cell array to a (1*n ) double matrix?
Use the dual representation of char() data as numeric that MATLAB will cast silently... c=[{'0011'}, {[ ]}, {'1010'}, {[ ]}, {[...

2 days ago | 0

Answered
How to use hold command with Plotyy and Subplot?
Ver 2 [y,t]=xlsread('Sample Data.xlsx'); t=datetime(t(2:end,1),'inputformat','MM/dd/uuuu','format','MMM yy'); mos=(year(t(end...

3 days ago | 0

| accepted

Answered
How to use hold command with Plotyy and Subplot?
Using the features TMW has given us more recently...in particular, datetime and yyaxis along with using some data organization b...

4 days ago | 0

Answered
Is it possible to create x tick labels with a fixed width
AFAIK, no, that's an amenity TMW hasn't yet provided with the ticklabel property. It's a very simple text string with formattin...

4 days ago | 0

Answered
How to select the part of the tables in a cell?
N1=98; C=cellfun(@(t) t(N1:end,:),C,'uni',0);

5 days ago | 1

| accepted

Answered
how to create a numeric tick label offset
x=[384230 384231 284232 ...]; X0=384200; % offset value -- uses arbitrary origin hL=plot(x-X0,y); ...

7 days ago | 0

| accepted

Answered
Save .xls in certain folder
You saved the variable app.Pedobarography_Values in the file 'Pedobarography_Values.xslx' but by the documentation for xlswrite ...

8 days ago | 0

Answered
How to delete axes and tick in figure?
Precisely. As your question says, you're trying to mess with axis properties, not those of the figure. Substitute hAx=gca; ...

9 days ago | 0

| accepted

Answered
How do you make individual points in a loglog graph appear? I am looking for the slope.
hLL=loglog(melting,temperature,'x-'); % Save line handles; line + marker 'x'

10 days ago | 0

| accepted

Answered
How to read rows of data in .csv file and turn them into arrays?
textscan is record oriented. Your file has sections; you have to read a section, rinse and repeat. Something like fmt1='delay...

11 days ago | 0

Answered
error only showing up with one for loop -- can't figure out what the problem is? going crazy?
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 257-by-1. Error in...

12 days ago | 0

| accepted

Answered
Minimize cmd.exe window launched from MATLAB?
Use a batch file or multiple command on the executable and START yourbatch /MIN to create the process minimized. Kick this o...

12 days ago | 0

Answered
How to group variables together
Not as "folders" per se, no. MATLAB doesn't have the concept of a scoping mechanism for variables independently. Where you see...

12 days ago | 0

Answered
Read from an Excel File and assign index that have the max/min value
Use the optional returned location variable and ind2sub to convert the position to coordinates. See the documentation; it shows...

14 days ago | 1

| accepted

Answered
"the variable assigned to a may be unused"
In %the build max heap function function maxheap = buildmaxheap(x,n) a = x; for i = floor(n/2):-1:1 %call heapify t...

14 days ago | 0

Answered
Polyfit minus one term
Without toolbox, use backslash operator, \ X=[x.^[3 2 1 0]]; X(:,2)=0; % design matrix straight calculation b=X\y; ...

18 days ago | 0

Answered
position of axis label
"There is no property to set to make the positioning automatic." Ah, but there is...unfortunately, it's another of those frustr...

19 days ago | 1

| accepted

Answered
How to remove points from a plot during pause
Indeed, pause halts virtually everything...I'm not a GUI guy but two possibilities I can think of; there may be better for those...

20 days ago | 0

Answered
How to load selected files, in a sequence, and implement them in a for loop?
"I want to process 400 frames, every 800 frames, and keep doing this for the length of the files..." ... nProc=400; nSkip=80...

20 days ago | 0

Answered
Plotting Error bars using minimum and maximum values in Matlab
Just make a vector of max(y), min(y) the same length as x and add/subtract to the mean for the error bar lengths. Since both fu...

21 days ago | 0

| accepted

Answered
Iterate thru each row on a Matrix and return the result on a vector
Don't need no steenkin' loops! This is MATLAB!!! :) kurt=kurtosis(y.').'; Above uses the fact that most ML functions in gener...

22 days ago | 1

| accepted

Answered
timetable 2 table error
Don't need to convert, plot() is overloaded to be datetime aware. Just use the t-table time variable (presuming that's what you...

22 days ago | 0

| accepted

Answered
I receive error when trying to use a simple OLS function?
"...certainly nothing should be out of context here. " Well, other than the missing function, the error says line 33 and there'...

24 days ago | 0

Load more