Find two contours at different levels around the same peak
You could (QD algorithming-from-the-hip) use the contour-coordinates in c1 and c2. Typically I find it easiest to break them con...

1 month ago | 0

| accepted

How to set the name with num2str in for loop?
Perhaps it is as simple as: for k = 1:1000 % assign the content of the file directly to variable A: A = load(['cp_',n...

2 months ago | 0

| accepted

Errorbar plot in colormap
You might get away with putting the errorbar-call in a loop. Perhaps something like this: figure(); clf box on hold on cmp ...

2 months ago | 0

| accepted

What is the Fourier Series Coefficient of F=exp(sin(x))?
Might I be so bold as to suggest (physicist writing about calculus here...) that this task ought to have some clever analytical ...

2 months ago | 0

How to use ode45 efficiently on a large input vector
If the ODE-system you're trying to solve is something like a set of independend equations of motion that only couple "pairwise" ...

2 months ago | 1

for loop, in irregular numbers clusters?
You will have these lists of "todos" and "not-todos" from somewhere outside, since, as you write, you can't type down all the nu...

2 months ago | 0

| accepted

How can I find dip direction and a dip of a plane with known normal vectors?
Some corrections you might consider are: load('artificial_slope.txt') %loading data % defining input values based of input txt...

2 months ago | 0

Automatically define anonymous functions.
You can solve this problem using matlabFunction to generate a function-handle: C=[-1,1,1+1/4*i,-1+1/4*i]; syms x; f=@(x) x.^2...

2 months ago | 0

| accepted

Multiple Plots in One Iterative Script
If you want all the points for each iteration in the 2 figures, then you will have to insert a hold on after each plotting comma...

2 months ago | 0

Read the release-notes. Check if your (most used) functions and programmes warns about "functionality will be removed" when you ...

2 months ago | 1

| accepted

Coordinate Systems for using Camera Calibration
Think of it this way: Each pixel (u,v) in the image are capturing light along some line in 3-D. You can write that line as: H...

2 months ago | 0

| accepted

How to setup the colormap by myself?
You can combine one row of white and the turbo colormap: cmp = [1,1,1;turbo]; colormap(cmp) This leaves the problem with the ...

2 months ago | 0

| accepted

How can I display a 3D image of a 10x10x10 matrix? Each cube has a value between 1-10.
You should be able to generate a figure like the cube you show by utilizing the slice-function. Something like this: % Mocking ...

2 months ago | 1

How to find angle for a curve in an image??
Since it is a bit unclear exactly how you're going about to select which points belong where you'll get a very general answer. C...

2 months ago | 0

How to make a 2D pseudocolor (pcolor) plot in triangle shapes instead of a square shape with triangle cordinates data?
This sounds like a task for trisurf. Check the help and documentation to that function. If you want the pcolor rather than the s...

2 months ago | 1

reverse lookup table from vector multiplikation with unknown vectors
This problem will be very "variably difficult" depending on the size of the vectors. It also might not have an easily found glob...

2 months ago | 0

Instead of using this explicit integratin of your coupled (?) odes with Euler's method, you should learn to implement the ODEs i...

2 months ago | 0

how to replace a symbolic variable with a real one after computation?
Perhaps straight conversion of the symbolic expressions to functions (function-handles, dynamical functions) with the matlabFunc...

2 months ago | 0

Problem plotting the trajectory of electron in static electromagnetic field
When you let the symbolic solver handle your equations of motion it might be safer to simply give dsolve the second-order equati...

2 months ago | 1

| accepted

How to add clockwise and anti-clockwise direction arrow in Plotting in Matlab
Download these two file exchange arrow-drawing contributions: arrow3 arrow They will be useful arrow-drawing functions for al...

2 months ago | 0

Saturation limit on 16 bit image in MATLAB
To just look at the maximum pixel-intensity is not the best of ways to handle this. For science-grade cameras you typically get ...

2 months ago | 0

Removing outliers from a matrix
QD-answer: The best you can do for single pairs of columns is to only use the rows where neither are outliers. With the cov-func...

2 months ago | 0

How to calculate the volume of tumor in logical image
You can simply calculate how many cells (voxels?) in your labels-variable are 1: Voxels = sum(labels(:)==1) That is the number...

2 months ago | 0

| accepted

Matlab is in the wrong working path, how to set it?
Generate full (or relative) path to the file you want to load: data_dir = '/home/me/data'; data_file = 'mydata.mat'; file2loa...

2 months ago | 0

How to save 7 different large matrix (for Landsat 7 bands) in one variable?
Break down your loops into something simpler first. Skip the outermost one and select one date that you know you have data from....

2 months ago | 0

Volumetric slice plot missing data
This is a well-known feature of the pcolor-surf-slice functions. If they are given arrays x, y and V (for pcolor and surf) the v...

2 months ago | 0

esitimate parameter and curve fitting kinetic model
Is your model correct? To my (very much non-biology-expert) eyes the ODE for c(1) seem to reduce to: dcdt(1) = C(1)*k*(1/K - 1)...

2 months ago | 0

Unexpected behavior of FFT
In the field (IS-radar) I work we have typical carrier-frequencies of 224-1000 MHz and the modulation band-width is a couple of ...

3 months ago | 0