Answered
How do I convert my matrix of 5799 x 1 double into 1933 rows of 3 x 1 cells?
Have a look at the repmat function. HTH

28 dagar ago | 0

Answered
How to speed up making large matrices, and reduce memory usage
This looks like a very sparse matrix, right? Then I would first figure out how to assign the blocks of Aineq from its components...

28 dagar ago | 1

| accepted

Answered
Using ODE45 to solve a system of 2nd order ODEs equation
After fixing the sign-errors in your ODE-function this: thetathetadot0 = [0 0 0 -1]; [t,theta] = ode45(@(t,y) pendulum(t,y),0:...

28 dagar ago | 0

| accepted

Answered
Conversion to double from struct is not possible.
This is obviously an operation that's not supported. If you look at the contens of one struct, you might find that the Jointname...

29 dagar ago | 0

Answered
Cross-validation the output of "scatteredInterpolant" in order to choose best method (linear, nearest, and natural)
To me that sound somewhat sensible, but would primarily check the regular-grid interpolation-method, and not the scatteredInterp...

29 dagar ago | 1

| accepted

Answered
How to create a scatter plot with three variables?
you should use scatter, something like this: psz = 23; scatter(x,y,psz,z,'filled') That should give you something to start wi...

29 dagar ago | 0

| accepted

Answered
How do I do Pyramid plot
Surely this is a homework task? Regardless, after you've figured out loops and conditional statements, you should start to thin...

ungefär en månad ago | 1

Answered
solution to non homogenous time dependent differetial equation using ODE45
You can convert a second order ODE to two coupled first order ODEs: can be split up into 2 by introducing a second variable, ...

ungefär en månad ago | 0

| accepted

Answered
The dimension of the input vector in the imagesc function
For this type of scattered data you can use scatter, something like this: scatter(data(:,1),data(:,2),23,data(:,3),'filled') o...

ungefär en månad ago | 0

| accepted

Answered
load file with try/catch error
With your first call of load: load -mat filename matlab will try to load a file with the explicit filename filename (or filena...

ungefär en månad ago | 0

Answered
Time of Flight measurement
You might get somewhere by calculating the spectrogram (short-time FT) of your signal. That might allow you to identify the time...

ungefär en månad ago | 0

Answered
How to smooth a contour plot using the low pass filter
Since your narrow structure is slant relative to your grid this will be difficult. The TriScatteredInterp with the 'natural' met...

ungefär en månad ago | 0

Answered
Very basic: Could someone please explain what the 2 stands for in "size(v,2)" ?
You'll need to learn to read the help and doc for matlab-functions and commands. Also: welcome to matlab. For this time only: s...

ungefär en månad ago | 2

Answered
Changing the parameters of the dynamical system in the middle of simulation, Part 2
For such conditions you might just get away with simply changing the output of the f-function. This is much easier to achieve if...

ungefär en månad ago | 0

| accepted

Answered
Changing the parameters of the dynamical system in the middle of simulation
For your case the easiest way to proceed is to simply run the ODE-integration first from 0-2 and then use the end-state as initi...

ungefär en månad ago | 1

| accepted

Answered
Trouble using fsolve with two non-linear equations and 3 parameter
You need to make the function eql_coef depend on the coefficients a and d, something like this: function F = eql_coef(a_d,K_H2O...

ungefär en månad ago | 0

Answered
Error when fitting a sum of 2D gaussians: unable to vary standard deviation.
You'll get my untested argument: Your free-widths parameters model include i and j and they might both be interpreted as (-1)^(1...

ungefär en månad ago | 0

| accepted

Answered
ODE solver with variable derivative
It is rather easy once you've wrapped your head around it: function dx = forcefunction(t,x_current,Pars4function) % Example wi...

ungefär en månad ago | 0

| accepted

Answered
Hi ,Can anyone help me to find the right code for Throwing a ball
Check the values of t... HTH

ungefär en månad ago | 0

Answered
What is the algorithm used by del2 at the boundaries of a matrix in MATLAB?
Try either of: edit del2 type del2 HTH

ungefär en månad ago | 0

| accepted

Answered
Continual points on a movie
If you want to plot all the points (x,y) from the first to point i you can do something like this: q = 1; for i1 = 1:numimgs %...

ungefär en månad ago | 0

Answered
How to create 2D Gray image from 3D colored image?
When you add data of non-double type you'll run into all sorts of wrap-around problems. When I work with images I typically cast...

ungefär en månad ago | 1

| accepted

Answered
How to plot a vector and line normal to vector
If you have a normal-vector to a plane and want to plot 2 vectors in the plane you could do something like this: n = [n_x,n_y,n...

ungefär 2 månader ago | 0

| accepted

Answered
I just want to know the reason why the integral function doesn't work this way?
You have to convert the symbolic function to a function-handle that returns a scalar double. You can do this for your example p...

ungefär 2 månader ago | 0

| accepted

Answered
interpn griddata difference?
The interpn function requires input data on a plaid grid, i.e. as you would produce with meshgrid, or perhaps ndgrid, while grid...

ungefär 2 månader ago | 0

| accepted

Answered
Reduce padding around saved image
If you save your edge-enhanced image with something like print -dpng your-image.png you can increase the fraction of your imag...

3 månader ago | 0

Answered
Solving an ODE in matlab
First thing you should learn/revise/refresh is how to convert higher-order ODEs to sets of coupled first-order ODEs. You have a...

3 månader ago | 1

Answered
Potting Cross-section of an image
First you need to figure out the size of your image - whethre it is an intensity-image or an rgb-image: imsz = size(img); Once...

3 månader ago | 0

Answered
Help solving this 2d pde
You are in luck! Matlab provides you with a (rather hidden) method to give you the 2-D Laplacian in matrix form. Have a look at ...

3 månader ago | 0

Answered
Dynamic spectra for 1000 files
It is unclear what data you have in your files. Is it frquency and power-spectra from spectrum analyzer? If so then you can simp...

3 månader ago | 0

| accepted

Load more