Community Profile

# dpb

3,816 total contributions since 2012

View details...

Contributions in
View by

How do I name a graph using a string with probplot?
titlestr=strcat('Number of VCSELs = ',num2str(size(data,2)),' Number of failures = ',num2str(NFail)) title('titlestr') ...

3 days ago | 0

| accepted

for loop produces a 103x1 array I need a 1x103 array.
Write P_S(ii,1)... But, why use a loop at all--use the vector functions in Matlab instead. I've not tried to decipher the RHS...

4 days ago | 0

| accepted

How do I Create a Matrix that connected to Excel using MATLAB
Have to know the structure of the file or write code to find what you want...I'll presume you can count columns... :) >> [n,t,r...

5 days ago | 0

FFT from CSV file
Follow the recipe provided precisely...you've doubled the DC and Fmax components so that the DC bias is shown as twice what it w...

5 days ago | 0

| accepted

Creating plot with 2 x axes
If you'll go through step by step, you'll see the problem doesn't occur until the second plot() call -- you didn't hold the seco...

5 days ago | 1

| accepted

I have a matrix (57,3600,45), how can I create matrices with (3600,45)?
Why did you store data in such a permuted order? However, not to fear, MATLAB can fix your problem! data=permute(data,[2 3...

6 days ago | 0

Comparing common strings in two large string arrays imported from excel (using xlsread)
[c,ia,ib]=intersect(categorical(s1),categorical(s2));

6 days ago | 0

Plot data with x-axis as date
t=datetime(2019,1,1,0,0:15:365*24*60-15,0); plot(t,randn(size(t))) hAx=gca; hAx.XTick=datetime(2019,[1 7 12],1); ADDENDUM: ...

7 days ago | 0

| accepted

if function for array
I have a little utility function ("syntax sugar") for such things... plot(x(iswithin(x,52,54))) where >> type iswithin.m ...

8 days ago | 0

| accepted

I want to read similar column headers and standardize their names
Picking up where left off above with two string arrays of quoted string column labels from the two shown-to-be-different files.....

10 days ago | 1

| accepted

Saving a cell with multiple vectors of different length to csv or xlsx
The easier way but does open/close the file every time... N=size(val,3); rOff=0; for i=1:N v=val{:,:,i}; ...

11 days ago | 0

| accepted

Jump datetime in graphs and tables
You mean generate a series of some time difference (like three months above)??? dat=datetime(2010,2:3:9*12,1).'; dat.Format='...

23 days ago | 1

| accepted

csvwrite is storing wrong number
>> tstary=int32(randi(2^31,104937,1810)); >> whos tstary Name Size Bytes Class Attributes ...

26 days ago | 1

| accepted

Question

COM Syntax Queston (Excel example but general puzzle)
If/when driving Excel or other apps via COM/ActiveX, "dot" syntax isn't always available for every method and one is forced tor ...

28 days ago | 1 answer | 0

### 1

How to normalize curves with multiple peaks such that each peak will be 1 and each valley will be 0?
If you mean 'builtin' already coded to do that, "No, I don't think so!" I've never seen it actually done before; don't think it...

1 month ago | 0

| accepted

>> which -all cusum C:\ML_R2017\toolbox\signal\signal\cusum.m >> Your present release apparently doesn't have the Signal Pro...

1 month ago | 2

Question

ISMEMBER() modified result desired
[lia,locb]=ismember(A,B); returns the first/last matching location in B of the elements in A that occur in B depending on which...

1 month ago | 2 answers | 0

### 2

Create new vector from 2 differnet cells
You could use loops, but that's not "the MATLAB way!"... This also superfically seems like a place cell arrays may be in the wa...

1 month ago | 0

| accepted

How to remove period stamp in datetime plot ?
This was a side subject of a thread some time back with the need to combine durations with times at which the event durations oc...

1 month ago | 2

How to load text file and extract number from file that is not organized into columns?
That's a very nicely organized file in the sections...you just have to know what the section headers are and which you want... ...

1 month ago | 0

| accepted

Question

Debug and Focus, Huh?
Is there no way to make focus stay in command window instead of jumping to editor when reach breakpoint???? Am always typing on...

1 month ago | 2 answers | 0

### 2

MATLAB Answers Wish-list #4 (and bug reports)
I would put a hard character limit of (say) 50 characters on the Title -- mandate that the question is in the text, do NOT even ...

1 month ago | 1

Writing multiple matrices into text file
fid(i)=fopen(filename, 'wt'); From the doc for fopen -- permission: 'w' Open or create new file for writing. Discard e...

1 month ago | 0

| accepted

Hello, i want to display separate (side by side) bar on one graph. below is my code but its display bars on single column. and image what i should do?
AMENDED: Rank = [15678 10987 15243 3467 1234; 1111 3456 13456 3345 1038].'; C = categorical ({'Google','Bin...

1 month ago | 0

| accepted

Explode cell that are into another cell
OK, I overlooked the regular expression in the format string that sucks up all of those extra blanks at the end of the odd-man-o...

1 month ago | 1

Preallocate char array: Wrong values
Any array must be rectangular; char() arrays are no different. The array must be as wide (have as many columns) as the longest ...

1 month ago | 0

| accepted

compile MatLab into standalone exe, how to pass matrices as input.
"[A]rguments can be passed to standalone applications created using MATLAB® Compiler™ in the same way that input arguments are ...

1 month ago | 0

| accepted

Change figure legend horizontal spacing
Something legend gives no control of directly Increase the width of the legend will spread them out hLg=legend('gefeuert','ni...

1 month ago | 1

xlswrite Issue: not writing an entire column
The first column of data is a column of cells each containing a cell containing... xlswrite can't handle that. data(:,1)=...

1 month ago | 0