Community Profile

# lvn

47 total contributions since 2013

View details...

Contributions in
View by

How to change the line width for fplot?
Starting in R2016a, you can specify the 'LineWidth' property the same way you do for plot. For example: >> fplot(x1,[0,2],'k','...

6 Monate ago | 9

| accepted

How do I create a logarithmic scale colormap or colorbar?
Strange official answer, since it is clearly possible in Matlab: set(gca,'ColorScale','log') <https://nl.mathworks.com/h...

etwa ein Jahr ago | 2

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

etwa ein Jahr ago

Question

Fat and ugly lines in eps export
I have a high resolution map of the world. When I try to export it as an eps with print('-depsc','-painters', '-loose','tes...

etwa 3 Jahre ago | 0 answers | 0

### 0

Ho to plot a pressure map?
Looks to me like you are looking for an interpolation function to move to a finer grid. See here for the 2D version: <http://mat...

etwa 3 Jahre ago | 0

Question

How to generate surface preserving probability density function from histogram
I have a histogram with non uniform bins. From this I would like to estimate a smooth probability density function(basically a...

fast 4 Jahre ago | 1 answer | 0

### 1

Question

VPA behavior, workaround requested
Does anybody now a workaround for this behaviour of vpa?: syms a b c c=a+b; a=1; b=1; vpa(c) ans = a + b ...

etwa 4 Jahre ago | 1 answer | 0

### 1

Any recommendation how to vectorize this double for loop?
A couple of things: 1. If size(MM(looper,:),1) is independent of looper (as you suggest?), you can simply precalculate it bef...

mehr als 4 Jahre ago | 0

Question

Symbolic array pre-allocation
Symbolic array pre-allocation only allocates pointers as I understood it from reading the forum. This is causing a major slowdow...

mehr als 4 Jahre ago | 1 answer | 0

### 1

Question

Most populated range of floating point numbers in array
histc can be used on a floating point array to find the bin with the largest number of elements. However these bins are fixed, a...

mehr als 4 Jahre ago | 2 answers | 0

### 2

Elegant way to know in which iteration of for I am
This should do it: if (protocol_ID==1 || protocol_ID==4) && n_runs > N_categories( 1 ) .. elseif (protocol_ID==6 |...

fast 5 Jahre ago | 0

how to assign the pixel to clusters based on euclidean distance ??
<http://www.mathworks.nl/help/stats/kmeans.html>

fast 5 Jahre ago | 0

How to solve 3 equations with 3 unknowns using 'for' loop?
I guess you are meant to solve these equations by iteration? Something like this would do x=1;y=1;z=1; for l=1:30 ...

fast 5 Jahre ago | 0

| accepted

Plot at the same figure
The problem are these lines: figure1 = figure('Color',[0 1 1]); axes1 = axes('Parent',figure1,'FontSize',12,'FontName','...

fast 5 Jahre ago | 0

| accepted

Problem to add greek chars as ticklabel
It does not seem supported, but there is a work around: <http://www.mathworks.com/matlabcentral/answers/102053-how-can-i-make...

fast 5 Jahre ago | 1

| accepted

Extra term in "min" function in while loop
I guess it is a remainder of some old code. It can be removed, it does nothing!

fast 5 Jahre ago | 1

How to extrapolate data from a matrix of x axis values and corresponding y axis values?
This is for a linear extrapolation: interp1(x,y,4,'linear','extrap') ans = 2.5000e+03

etwa 5 Jahre ago | 0

How to plot a circle on top of my plotted image

etwa 5 Jahre ago | 0

3D matrix manipulation. FInd values of given positions
This should do it: sum(matrix2(matrix1~=0))

etwa 5 Jahre ago | 0

| accepted

Input data from one array to another
The main problem with your code was the double for loop. Even if a match was found, for say j=50; it was overwritten in the seco...

etwa 5 Jahre ago | 0

| accepted

what is the function of 'eval' ?
Eval can be used to run matlab commands which are not known in advance, but only at runtime. In your example eval executes the c...

etwa 5 Jahre ago | 0

| accepted

getting name of all functions i use in m file (or script)
<http://www.mathworks.nl/help/matlab/matlab_prog/identify-dependencies.html>

etwa 5 Jahre ago | 0

Matlab Cropping Plots to remove whitespace
On the fileexchange there are a lot of functions out there that can do this for you. I use for instance spaceplots <http://www.m...

etwa 5 Jahre ago | 0

| accepted

how to make spatial plot using hdf5-1.8.8 data in matlab R2009b?
It looks like 'temp' is not the right variable to use here and is used for calibration purposes. From the manual <http://122.2...

etwa 5 Jahre ago | 0

You can use the eval function to create such variables. However this practice is not recommended and can almost always be circum...

etwa 5 Jahre ago | 0

| accepted

Several vectors as inputs to function
It all depends whether your function BSCall supports vector input. If it does, then just Values=BSCall(S,K,T,v,r) with ...

etwa 5 Jahre ago | 0

How can I substitute values in a matrix if they equal a certain value?
I hope this is what you mean: newmatrix=X1; newmatrix(X1==255)=X2(X1==255);

etwa 5 Jahre ago | 0

How to sort rows of a 2D array, such that all elements along a diagonal are non-zero?
For reference, here is a solution using the backtracking. The main algorithm part is around 20 lines. This is the initial s...

etwa 5 Jahre ago | 1

how to make a spatial plot?
Assuming your dataset are vectors, you could simply make a scatterplot scatter(longitude, latitude, 5, rain); Alternativ...

etwa 5 Jahre ago | 0

| accepted