Community Profile

photo

Bjorn Gustavsson


UIT, the Arctic University of Norway

Last seen: 2 Tage ago Active since 2001

Statistics

All
  • Guiding Light
  • Revival Level 2
  • Solver
  • First Submission
  • Explorer
  • 24 Month Streak
  • 5-Star Galaxy Level 5
  • Knowledgeable Level 4
  • Personal Best Downloads Level 2
  • Editor's Pick
  • First Review
  • Thankful Level 1

View badges

Content Feed

Answered
How to use one marker for looped plots in legend
To get full controll of legends use the graphics-handles that are returned from the plot-functions. Perhaps something like this:...

4 Tage ago | 0

Answered
How to determine the coefficient from the argmin function ?
This is a standard minimization-problem, for that matlab has the fminsearch function (and possibly a couple more in the optimiza...

4 Tage ago | 0

| accepted

Answered
Roughness of 3D Surface
There are a number of hits returned when searching for "curvature" on the file exchange. The gptoolbox seems to have a bunch of ...

4 Tage ago | 0

| accepted

Answered
How to range array steps
Split into two sequences: x = [-1:-1:-32,32:-1:1]; HTH

4 Tage ago | 1

| accepted

Answered
How to implement Hermite spline in Simulink
There is a way to make blocks that wrap a matlab-function (matlab-functions-simulink_5), shouldn't that solve this task? HTH

4 Tage ago | 1

| accepted

Answered
Speed Up the for loop
A couple of suggestions: 0, check the time spent on different lines by running this script with smaller limits on j and i with ...

10 Tage ago | 1

Answered
Principal component regression, keeping variable names
Well the eigen-vectors will correspond to some linear combinations of your orignal variables. As such one eigenvector might for ...

10 Tage ago | 1

Answered
Solving coupled differential equations.
The first trick to try with these coupled integro-differential equations is to try to "differentiate away the integrals": whi...

11 Tage ago | 0

Answered
How can I obtain the Fourier Transformation as a product of matrices?
Have a look at the help and documentation for dftmtx. That function should return the discrete Fourier-transform matrix and give...

11 Tage ago | 0

Answered
Solving non linear equation "Circle" equations
If the 20 equations are of the same form you will have a vastly overdetermined problem (that in general will not have any exact ...

11 Tage ago | 0

Answered
How can we plot the correlation
It seems that you ask for the corrcoef. If you look at the correlation between 2 signals you will simly get a 2-by-2 matrix whic...

12 Tage ago | 0

| accepted

Answered
how to solve a non linear ode equation ?
You have a quadratic equation for dCAdt, solve that one as a standard quadratic equation, you will end up with two solutions for...

12 Tage ago | 0

Answered
Implementing Runge kutta method in place of ode45
You simply take the RK-scheme that suits your preferences and needs, for example from: Runge-Kutta methods, and plug that into a...

12 Tage ago | 0

Answered
Can Ode 45 solve piecewise function in the iteration?
Your best approach is to use the events-handling procedure to interupt and restart the ode-integration whenever x and y passes t...

13 Tage ago | 0

Answered
Many 2D histograms, single colorbar
For that type of equalization I do someething like this: for i1 = 1:4 numberPairs(i1).matrix = randn(1000,2); subplot (2,...

18 Tage ago | 0

| accepted

Answered
Find centroid of curve
Something like this ought to work: [~,iEnd] = max(spline_pts(1,:)); [~,iStart] = max(spline_pts(2,:)); R1 = spline_pts(:,iS...

18 Tage ago | 0

| accepted

Answered
Generate random number between -Inf and 0.5
Since the cummulative-distribution-function of the random-number-distribution has to be one at +infinity, you need to have some ...

18 Tage ago | 0

| accepted

Answered
Early exit instead of a warning in ODE113?
The brute-forciest way to do this might be to give ode113 an event that interrupts after some suitably long time, i.e. long enou...

20 Tage ago | 0

| accepted

Answered
Efficient ODE with function handles
If the function-handle-argument is too costly and you still want "some general flexibility" you might try to simply extend the O...

23 Tage ago | 1

Answered
How to specify the color of this contourf plot?
Maybe you can avoid the problem by using fill or patch by extracting the coordinates of the perimeters of the landmask? Somethi...

23 Tage ago | 0

| accepted

Answered
Multidimensional lookup table using griddedInterpolant
If you calculate all the combinations of points you dont need to go over the allcomb way, you could just as well run ndgrid at o...

23 Tage ago | 0

Answered
How to solve this Projectile Motion Problem
You write down the equation of motion: taking into account as many physical effects as necessary (gravity, drag) to get a sol...

24 Tage ago | 0

Answered
Interpolation of circular data
To my understanding simply extend the input arrays such that you have a couple of points from the first few samples added onto t...

25 Tage ago | 1

| accepted

Answered
How to enter and define a function with the value of one input form the order of matrix for another input
If you need a function with a bit more complexity than "a one-liner" simply write it as an m-function file. Then you can do pret...

25 Tage ago | 0

Answered
How can I plot a straight line from a curve?
To plot a line between a point [x_i,y_i] and [0,0] simply do this: ph0p = plot([0,x_i],[0,y_i]); Then you can decorate the lin...

25 Tage ago | 0

| accepted

Answered
For inbuilt solvers ODE23/DDE23, how to keep saving/output all solution values intermediately (eg: every 1 hour, save/output the solution instead of only after reaching tf)
You could request output for a selected set of points in time instead of only setting the time-span: t_all = [0:1:500]; [t_out...

26 Tage ago | 0

Answered
How can I add single vertical data cursor for all subplots ?
If you search on the file exchange you will find vertical-line FEX search-results, at a first glance at least the 4th and 6th su...

26 Tage ago | 0

Answered
How can i solve this optimization problem?
Best route might be to properly differentiate J with respect to delta_Uk and solve the normal equations and find an analytical s...

26 Tage ago | 2

| accepted

Answered
Solving system of ODE's contains complex equations
The way it looks to me you have a problem something like this: One problem is that the B-matrix you've given is singular whic...

26 Tage ago | 0

Answered
Scattered point clouds for pairs of arays
Have a look at the help and documentation for scatter. If you have very many points you might consider using histogram to get an...

etwa ein Monat ago | 1

Load more