Community Profile

# dpb

3,172 total contributions since 2012

View details...

Contributions in
View by

How to control Minortick number
See the numeric ruler for some additional control over axis appearance not made visible by the _axes_ object... <https://www.mat...

14 hours ago | 0

Good afternoon. Please I need help. I have my data arrange as (Lat Lon Z) on a regular grid. I want to used this data on regular grid to plot contour without any interpolation of any kind. How do i do it and how best can I arrange my data. Thank you
|*countour*| only works with _Z_ data as a matrix; an element for each _X_, _Y_ pair in the input coordinate locations; it doesn...

1 day ago | 0

| accepted

Time Format: import unique format to be able to plot
Convert to |datetime| type; unfortunately, the |uiimport| and friends aren't enabled to read time format strings...but, that's e...

6 days ago | 0

Stretching axis to observe data
Well, since your monitor probably has only roughly 2000 pixels/line even if you could draw your plot with every bit for the grap...

8 days ago | 0

| accepted

I have to create a function that returns two outputs. The outputs need to be a scalar and a column vector but my function only outputs the scalar. How can i get it to output the vector?
Well, it's a fairly useless function with everything hardcoded inside instead of being passed, but I presume that's because you'...

13 days ago | 0

How to add a top x-axis related to non-linearly to the bottom x-axis?

14 days ago | 0

How can I fix this error? "Func returns a vector of length 2, but the length of initial conditions vector is 3. The vectors must have the same number elements"
OK, that makes it _much_ easier...I ran your code and put a breakpoint at the |end| in |cassens|. Indeed, at that point |dydt...

15 days ago | 0

| accepted

using IF and && together
The "why" is because the |&&| operator "short-circuits"; IOW, if the first condition is met so the answer is known from the firs...

15 days ago | 0

| accepted

How to find value of x for each w in W without using a for loop?
_"... How would I do it without the loop?"_ Call the function with the *vector* argument _w_ and inside the function # Set...

15 days ago | 1

| accepted

How to plot an array in negative axes
Ah...ok, now I see...presuming the array is assumed to match box boundaries, just define _X,Y_ to match the dimensions you want-...

15 days ago | 1

| accepted

What is missing from MATLAB?
|TABLE| type needs display format by variable similar to the |DATETIME| object. Having to set global application format is a nu...

15 days ago | 0

Inner matrix dimensions must agree
That is so excepting when you get to underdamped = exp(-t./T1)*(B1*cos(omega*t.)+B2*sin(omega*t.)); you're trying to mu...

16 days ago | 1

| accepted

Date format changes at midnight
It's unfortunate the ML time functions aren't more forgiving of such cases. Best I can think of otomh is to either do the fix...

16 days ago | 0

How can I use datetick with more than x, y, z in input and on Y-axis?
Syntax for |datetick| is datetick(tickaxis) _not_ datetick(wanteddateaxisvariablename) Just need datetick('y...

17 days ago | 0

| accepted

How to plot a graph for one set of data against two y axes, one a function of the other?
Well, you can do it but I doubt you'll like the result... yy=18./y.^2; scatter(x,y) yyaxis right hAx(2)=gca; hA...

17 days ago | 0

how can I place my error bar in separate bar center?
See the "trick" to locate the midpoint of stacked bars from the hidden property at <https://www.mathworks.com/matlabcentral/answ...

20 days ago | 0

| accepted

How to add/subtract elements of 2 matrices to create a new matrix of the same size based upon conditional statements?
Nothing needed but to use the result of the logical array as an addressing expression... Mrx=Mx; % build the start point;...

23 days ago | 0

| accepted

Calling Excel and Matching Data in Matlab
Consider using |readtable| to bring the data in; making the ID column |categorical| data type will have advantages in writing lo...

23 days ago | 0

Index exceeds matrix problem
In brute force, use |try ... catch ... end| to catch the error elements for i=1:length(cell) try if cell{i}(3)=...

24 days ago | 0

My function output has complex numbers, and I'm not using i or j. Why?
angle = acos(dot(a,b)/(norm(a)*norm(b))); >> acos(2) ans = 0.0000 + 1.3170i >> acos(1+eps) ans = ...

26 days ago | 0

| accepted

can someone explaing the computation for double sided and single sided spectrum in fft() example
The example is single-sided from F=0:Nyquist (Fs/2). Since the FFT returned by Matlab is double-sided, from -Fmax:+Fmax, ...

26 days ago | 0

Excel and ActX Syntax Translate to Matlab
In case anybody else were to find this and want to see how it can be done...whether this is anything at all close to optimal I'v...

1 month ago | 0

Question

Excel and ActX Syntax Translate to Matlab
Trying to iterate over a collection object and can't figure out syntax...example is Worksheet=Excel.ActiveSheet; % return...

1 month ago | 1 answer | 0

### 1

Polynomial fit from the equation
_Maybe you see the problem?_ Ayup...in plot(time, log10(y4), 'g-') you transformed the output of the transformed mode...

1 month ago | 0

| accepted

Finding out values for elements of an array from corresponding array elements?
I think simplest solution would be to just augment the weights array by a placeholder for the missing diagonal positions; then t...

1 month ago | 0

What is missing from MATLAB?
Perhaps more enhancement than missing, but... A search function that is tolerant of variable data types in the target object....

1 month ago | 0

How can I write a cell array containing strings to excel?
From the documentation, ... A — Input matrix matrix Input matrix, specified as a two-dimensional numeric or charac...

1 month ago | 0

| accepted

Read 2 specific columns in excel file
In the addressing expression (:,1,:,7) there are four dimensions, not just two -- the first colon will reference all rows, then ...

1 month ago | 1

| accepted

How to run a .bat file in background without opening command prompt?
Presuming Windows, try something like cmd='yourprogram inputs'; % the command line to execute to run your model...

1 month ago | 1

| accepted

Question

Rearrange cell content by groups
There's got to be a simple way to do this... Have a cell array of data by date wherein there are N (or fewer) instances of M ...

1 month ago | 2 answers | 1