Answered

how do i fix inline function error?

Hi, you can try this: work5(0.5) function A=work5(x) m=1; fun = @(n) log(n)./(n.^2); % *** for k=10:...

how do i fix inline function error?

Hi, you can try this: work5(0.5) function A=work5(x) m=1; fun = @(n) log(n)./(n.^2); % *** for k=10:...

6 months ago | 0

| accepted

Answered

Substracting all elements in two arrays with different sizes

Enjoy ... a1 = [1 2]; a2 = [1 2 3]; res = a1.' - a2 ; res = res(:).' Pay attention to the fact that a1 and a2 must be row-ve...

Substracting all elements in two arrays with different sizes

Enjoy ... a1 = [1 2]; a2 = [1 2 3]; res = a1.' - a2 ; res = res(:).' Pay attention to the fact that a1 and a2 must be row-ve...

6 months ago | 2

| accepted

Answered

adding answers into cell array

Hi. You could do like this: answers = {}; for n = 1 : 10 % My very complex computation res = sprintf('The answer is ...

adding answers into cell array

Hi. You could do like this: answers = {}; for n = 1 : 10 % My very complex computation res = sprintf('The answer is ...

6 months ago | 0

Answered

Ax = 0 with 2 values of x known

Basically, you are asking how to impose Dirichlet boundary conditions, right? If so, there are several methods: Substitution me...

Ax = 0 with 2 values of x known

Basically, you are asking how to impose Dirichlet boundary conditions, right? If so, there are several methods: Substitution me...

6 months ago | 1

| accepted

Answered

Creating mesh from volumetric array

Dear Alan, perhaps for your purpose you could try to use the marching cube algorithm. A Matlab implementation is available her...

Creating mesh from volumetric array

Dear Alan, perhaps for your purpose you could try to use the marching cube algorithm. A Matlab implementation is available her...

6 months ago | 0

Answered

running out of memory while executing matlab script?

Hi Asim, basically because in your code you use (in the wrong way) length instead of size: the function length returns the tot...

running out of memory while executing matlab script?

Hi Asim, basically because in your code you use (in the wrong way) length instead of size: the function length returns the tot...

6 months ago | 0

| accepted

Answered

Passing time step of ODE solver to odefunction for stochastic simulation

Hi Soeren, in my opinion the question is ill-posed, because (up to my knowledge) methods like ode45 are designed to solve dete...

Passing time step of ODE solver to odefunction for stochastic simulation

Hi Soeren, in my opinion the question is ill-posed, because (up to my knowledge) methods like ode45 are designed to solve dete...

6 months ago | 0

| accepted

Answered

problem with programm that use Newton-Raphson method to solve nonlinear equation system

Hi Mi, it is difficoult to give a precise answer without a deeper knowledge of the equation which has to be solved. Unfortunat...

problem with programm that use Newton-Raphson method to solve nonlinear equation system

Hi Mi, it is difficoult to give a precise answer without a deeper knowledge of the equation which has to be solved. Unfortunat...

6 months ago | 0

Answered

What is the main error in this code and how can it be solved?

Simply, the variable L is undefined. That is, you must assign a value to it before you use it, for instance by: L=2; a=0; b=1;...

What is the main error in this code and how can it be solved?

Simply, the variable L is undefined. That is, you must assign a value to it before you use it, for instance by: L=2; a=0; b=1;...

6 months ago | 0

Answered

Second order boundary value problem numerical solution

Hi. There are plenty of methods to solve your problem. Perhaps, the simplest one is by using Finite Difference; you can find man...

Second order boundary value problem numerical solution

Hi. There are plenty of methods to solve your problem. Perhaps, the simplest one is by using Finite Difference; you can find man...

6 months ago | 0

Answered

How to store consequtive numbers and vector jumps in different matrices?

Hi. You can try this: A = [1,2,3,6,7,8,11,12,13,14,15,17,18,19,30,31,32]; C = {} ; NC = {}; % Consecutive / Non Consecutive ...

How to store consequtive numbers and vector jumps in different matrices?

Hi. You can try this: A = [1,2,3,6,7,8,11,12,13,14,15,17,18,19,30,31,32]; C = {} ; NC = {}; % Consecutive / Non Consecutive ...

6 months ago | 1

| accepted

Answered

Labels above bar-plot

Hi. Up to my understanding, the problem seems to be that when you use bar(A) the coordinates along x are 1, 2, ... 40. Assuming ...

Labels above bar-plot

Hi. Up to my understanding, the problem seems to be that when you use bar(A) the coordinates along x are 1, 2, ... 40. Assuming ...

6 months ago | 0

| accepted

Answered

reallocating matrix concatenated as string

If I understand well your question, you wish to do this: sonucmatrisi = zeros(20, 69); faz1atananmakineler = zeros(20, 69); f...

reallocating matrix concatenated as string

If I understand well your question, you wish to do this: sonucmatrisi = zeros(20, 69); faz1atananmakineler = zeros(20, 69); f...

6 months ago | 0

Answered

sudo ./install doesn't start on Linux

This question has been solved here: https://fr.mathworks.com/matlabcentral/answers/1461039-on-ubuntu-sudo-won-t-run-the-install...

sudo ./install doesn't start on Linux

This question has been solved here: https://fr.mathworks.com/matlabcentral/answers/1461039-on-ubuntu-sudo-won-t-run-the-install...

6 months ago | 9

Question

How to exchange data between two C++ MEX files

Good morning, I need to write a two (or more) C++ mex functions the first MEX function allocates dynamically a std::vector<dou...

9 months ago | 1 answer | 0

Submitted

snippet

Snippet is a Matlab toolbox which allows to inline portions of C/C++ code in Matlab programs

1 year ago | 1 download |

Question

How to dramatically speed-up the function plot

Introduction Recently I found that in some circumstances the function plot is extremely slow, and I needed to find a solution t...

2 years ago | 2 answers | 1