Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 2

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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'...

plus de 5 ans il y a | 1

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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

plus de 5 ans il y a | 1

Réponse apportée
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 ...

plus de 5 ans il y a | 1

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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 = ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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 ) *...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 0

Réponse apportée
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 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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 ->...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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); ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Don't know what is wrong with this double integral code
Use integral2 instead. That should solve this type of problem. HTH

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Charger plus