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 ...

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 ...

11 jours 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...

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...

12 jours 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 ...

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 ...

14 jours 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 ...

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 ...

14 jours 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...

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...

15 jours 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...

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...

15 jours 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...

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...

15 jours 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...

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...

15 jours ago | 0

| accepted

Answered

Display rgb image in cartesian plane

Previously I've used: tcolor, with good results. HTH

Display rgb image in cartesian plane

Previously I've used: tcolor, with good results. HTH

15 jours 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...

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...

16 jours 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...

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...

16 jours 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...

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...

16 jours 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...

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...

16 jours 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...

Blurred latex figure label

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

17 jours 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...

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...

18 jours 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...

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...

18 jours 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...

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...

21 jours 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 ...

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 jours 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...

Linear interpolation Using Polyfit

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

22 jours 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...

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...

22 jours 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...

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...

22 jours ago | 0

Submitted

Scrollsubplot

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

23 jours ago | 14 downloads |

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 jours 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...

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...

24 jours 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...

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...

24 jours 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...

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 jours 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...

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...

26 jours 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...

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...

26 jours 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...

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...

26 jours 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 ...

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 ...

26 jours ago | 0

| accepted