Beantwortet
Cell to mat conversion
If you want to extract the content of one cell simply do: b = a{1}; If you want to merge a couple of cells into an array or ma...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
interp2 error non monotonus
It should (big claim, I know) be as simple as: torque = data(2:end,1); rpm = data(1,2:end); eff_epk = data(2:end,2:end); Nm ...

mehr als 5 Jahre vor | 2

| akzeptiert

Beantwortet
How to make subplots scroll at the same time?
See the help and documentation for linkaxes (and possibly linkprop). I'd do something like this: %Create subplot sph1 = subplo...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
how to vectorise or speed up the specific code
Newton says you can cut it in two if you take into account that the force from particle i on particle j is equal but directed in...

mehr als 5 Jahre vor | 2

Beantwortet
Why `sparse` function accumulate large sparse COO format matrix by index so fast?
Because sparse is a built-in function that Mathworks most likely have spent many man-months (we wouldn't know) on optimizing. Yo...

mehr als 5 Jahre vor | 0

Beantwortet
How to create null vector Matlab
First off if you've done something like: N = 12; M = 14; K = 7; Mtr = randn(M,N); V = rand(1,K); V=zeros(1,length(N)-lengt...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
i need to save images with different file names in seperate folders
You can do this, as Jan hinted at, something like this: faces = 1:6 face_names = {'top','bottom','front','back','left','right'...

mehr als 5 Jahre vor | 1

Beantwortet
how to make a covarinace matrix using data from excel?
Just use cov. From the help of the cov-function: cov Covariance matrix. cov(X), if X is a vector, returns the variance. F...

mehr als 5 Jahre vor | 0

Beantwortet
How to make ticks labels (the numbers, not the axis labels.) bold when using latex interpreter.
This seems to work in general: set(gca,'fontweigth','bold') HTH

mehr als 5 Jahre vor | 1

Beantwortet
Average intensity as a function of angle in 2D FFT plot
This is kind-of-difficult in practice. Your fft has low-wavenumber components at [0,0], [1,0], [-1, 0], [0,1], [0,-1] and if we ...

mehr als 5 Jahre vor | 1

Beantwortet
How to substitute p(x/a+x1,y/a+x2) to p(x,y),where p(x,y) is original image, x1 and x2 are the centroid of p(x,y),x1=m10/m00,x2=m01/m00,a=sqrt(β/m00),β is a predetermined value. In fact, this is doing scale and translation normalization
You solve that with interp2: xi = xC + [-dx:dx]*xScale; yi = yC + [-dy:dy]*yScale; [xi,yi] = meshgrid(xi,yi); p_prime = inte...

mehr als 5 Jahre vor | 0

Beantwortet
for loop with vectors having different sizes
To fool-proof your concatenation, and to generate better directory-names you could do something like this: a = [1 2]; b = [3 4...

mehr als 5 Jahre vor | 0

Beantwortet
Instantaneous Velocity from Displacement and Time values
There are busloads of things you could try: interpolate to a denser time-grid (using 'phcip' or 'spline' for interpolation metho...

mehr als 5 Jahre vor | 0

Beantwortet
How to specify correct fontsize of text according to plot boundary coordinates
This is the best I can think of: th = text(-10.05,0.94,'Hello WORLD!'); % Some text-coordinate in a figure of mine txt_size = ...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Airy equation with ode solver
That is just a scaling-factor off. (in addition to some numerical issues around the zero-crossings.) This comes about because of...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
Warning: Solution does not exist because the system is inconsistent.
Have a look at the equations. If you rewrite them you will get: Bw1 = ( b1 + b2 ) * 2*cos(2*w1) + b3 == 0; Bw2 = ( b1 + b2 ) *...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
Drawing a Tangent to a Spline
When you calculate the gradient: m = gradient(yq, xq); Then your m will have the same dimension as your xq and yq arrays. So w...

mehr als 5 Jahre vor | 0

Beantwortet
MOUSE DOUBLE CLICK PROBLEM
Once I wrote an image-processing tool where I wanted to use all 4 mouse-button events - but it seemed as if the double-click eve...

mehr als 5 Jahre vor | 0

Beantwortet
How do I create a 3D response surface plot(Contour Plot) from X Y Z C points ?
That plot looks like it would be reproducible with scatter3. So have a look at the help and documentation of that function. One ...

mehr als 5 Jahre vor | 0

Beantwortet
Convolving 2D image with 1D filter
That works for imagesc of doubles: I2 = peaks(123); h = [0 0 0 1]; imagesc(I2) pause(0.5) imagesc(conv2(I2,h,'same')) Did ...

mehr als 5 Jahre vor | 0

Beantwortet
ODE15s Events function not working when switching between different ODE systems
It might be that it is only in event3 that you check for the CO2 concentration. You could also check if you change to the exact ...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to get surface data from spectrogram?
You have to learn to read the help and documentation of the functions used. If you try: help spectrogram This is what will be ...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Problem using ODE15s
You have an error in your continuity-equation, you have forgotten the loss of H2CO3 due to the first backwards reaction H2CO3 ->...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Vicious Circle Problem: How to solve ODEs with variables that are based on the solutions of the ODEs?
Perhaps something like this: odeFCN = @(t,S,L,R) [S(2); L*S(1)+R*(S(1)-S(3)); S(4); ...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
Vicious Circle Problem: How to solve ODEs with variables that are based on the solutions of the ODEs?
You might run the ODE-integration backwards, that would give you a problem where you could determine your unknown parameters fro...

mehr als 5 Jahre vor | 0

Beantwortet
How to calculate the pdf (probability distribution function) of a data having dimension 25x31x122?
One way to do it is using the histogram-function, see the help and documentation. Something like this: histogram(rainfall(:),mi...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
Don't know what is wrong with this double integral code
Use integral2 instead. That should solve this type of problem. HTH

mehr als 5 Jahre vor | 0

Beantwortet
run a program multiple times and save result
Sometimes I solve this problem this way: if ~exist('run_idx.mat',2) run_idx = 1; save run_idx.mat; else load('run_idx...

mehr als 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to reduce brightness of ceratin pixels from an Image?
Is this the operation that you're asking for? too_bright = 123; % or your chosen level replacement_level = 123; % Not a good i...

mehr als 5 Jahre vor | 1

| akzeptiert

Beantwortet
Gaussian fit to FFT Peak
Sure, you can do something like this: fcn_G2D = @(p,x,y) p(1)*exp(-(x-p(2)).^2/p(4)-(y-p(3)).^2/p(5)); err_fcn = @(p,x,y,I,fcn...

mehr als 5 Jahre vor | 0

| akzeptiert

Mehr laden