Community Profile

photo

Bjorn Gustavsson


Last seen: Today

UIT, the Arctic University of Norway

854 total contributions since 2001

Contact

Bjorn Gustavsson's Badges

  • First Submission
  • Explorer
  • 5-Star Galaxy Level 5
  • 12 Month Streak
  • Knowledgeable Level 4
  • Personal Best Downloads Level 2
  • Pro
  • Editor's Pick
  • First Review
  • Revival Level 1
  • Thankful Level 1
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
Removing rows in a matrix
If you can determine/calculate all rows you want to remove at once it is best to do the re-sizing of the array at once, instead ...

10 days ago | 0

Answered
How to calculate the field on the surface created with Delaunay triangulation?
If you have the magnetic field components at the points [x,y,z] then you should be able to use TriScatteredInterp or (preferably...

11 days ago | 0

Answered
Too many output arguments ode23t
Try to change your maxh_d function to explicitly return dxdt: function dxdt = maxh_d(t,x) dxdt = zeros(2,1); % x(1) refers to ...

13 days ago | 0

| accepted

Answered
Contour plot size reduction
To get the figures "just right" you might have to manually masage them a little bit. When it comes to colorbars I often have to ...

13 days ago | 0

Answered
Reversing/Alternatives of function handles
Some of our mathematic operations does not only depend on calculations of their value at a fixed set of known points. For exam...

14 days ago | 1

Answered
Optimal Code Structuring - Global Variables
Matalb allows you to write functions with multiple out-put variables: function [phi_12,l_12] = a_silly_fcn(r1,r2) phi_12 = ata...

14 days ago | 0

Answered
Reverse/flip values in the colorbar axis
If you want exactly that colormap, but flip it you can do this: cmp = colormap; cmp = flipud(cmp); colormap(cmp); You shou...

14 days ago | 0

Answered
How can I utilise shooting method for following equation
Since you are a matlab-beginner you should first start to work through the introduction material, there are some intro-course-we...

14 days ago | 0

| accepted

Answered
Display rgb image in cartesian plane
Previously I've used: tcolor, with good results. HTH

15 days ago | 0

| accepted

Answered
Speeding up calculation and removing symbol operation for modelization
You can simply define your model-function something like this: func = @(B,x,y) B(3)*x+B(1)*exp(B(2)./y); There is no reason to...

15 days ago | 0

| accepted

Answered
What is the difference between conv2 and imfilter?
The first question is very simple to answer, conv2 has as its default behaviour: 'full' - (default) returns the full 2-D conv...

15 days ago | 0

Answered
Dot indexing is not supported for variables of this type.
When you get a problem like this it is because the variable is not of a struct as you expect. In general you can add a line with...

15 days ago | 0

Answered
How to close mutiple uifigure using command
If you want to keep some figures you can close a subset of them if you keep the figure-handles in an array. If you modify your c...

15 days ago | 0

Answered
Blurred latex figure label
Print your figure to post-script format using the -painters renderer: print('-depsc2','-painters','Your-new-and-pretty-figure-0...

16 days ago | 1

| accepted

Answered
Extract data from contour plot of .png file?
In case the conversion of the colormap to grayscale doesn't work well (i.e. multiple colours mapping to the same gray-level) I o...

17 days ago | 0

Answered
Any Precondition for the slow decay singular value??
Unfortunately I could not access the paper. However, I'll offer my opinion anyway. Once you've calculated your SVD-decomposition...

17 days ago | 0

| accepted

Answered
2 dependent ode45 equation
If you have 2 coupled ODEs: Then it is best to integrate them toghether. If you for some reason cannot do that or your prob...

20 days ago | 2

| accepted

Answered
Find the element that is a sqrt of another element in the same array function?
Hint: Which number are you actually comparing, and which number-combinations do you need to compare? One thing I'll suggest is ...

21 days ago | 0

Answered
Linear interpolation Using Polyfit
Repeat question. What's missing from the answer I gave you here: Using polyfit for linear regression? Perhaps explicitly telli...

21 days ago | 0

Answered
Vertical concatenation of structure fields (compact form)
This gets you to a 2-by-suitable char array: char(structure.field) But this will obviously not be a general solution for field...

21 days ago | 2

Answered
Using polyfit for linear regression
Your code looks OK. Your problem might be that you expect a result identical to the figure from the documentation. However, you...

21 days ago | 0

Submitted


Scrollsubplot
scrollsubplot(n,m,p) p<0 and p>nm, Extends subplot to infinite canvas ...

22 days ago | 14 downloads |

Thumbnail

Submitted


check4nameclashes
checks for name-clashes between m-files found in a directory and its subdirectories and files in directories on the the current ...

23 days ago | 1 download |

Answered
Changing a double type cell in "HH:MM:SS" format.
Well you get an output from datestr: datestr(4.099215427200000e+09,'yyyy mm dd HH:MM:SS') ans = '3270 08 21 04:47:59' Yo...

23 days ago | 1

Answered
Symbolic sin(pi) in Matlab 2020 a not simplify
That is because your definition of pi as a symbolic variable that hides the built-in pi. Try: which pi -all or: sym x pi = 4...

23 days ago | 1

Answered
How can I solve the following derative problem in Matlab ?
When you assign: t = -1; t becomes a standard double scalar, and is no longer a symbolic variable. So that's where you go comp...

25 days ago | 0

| accepted

Answered
Problem with the latex eps format
When you write to postscript-format matlab (still) makes "clever" choises about how to write the file. Try to enforce vectorized...

25 days ago | 1

| accepted

Answered
converting from sym to double
Most of the time I want to convert a symbolic expression to something else I use matlabFunction: syms s x real f = int(cos(s^2...

25 days ago | 0

Answered
How can I solve non-linear differential equations?
The ODE-integrating functions of matlab are well suited to solve this kind of problems. Have a look at the help and documentatio...

25 days ago | 0

Answered
Finding Dominant Frequency and Phase using FFT
Change your function to cos((2*pi*fmod*t) + pdelay) and re-run your code-snippet. Also check what happens when you reduce your ...

25 days ago | 0

| accepted

Load more