Respondida
How can I use feval, linespace and int()?
You can do like that: syms x; ex = int(x^2); s = @(x) subs(ex, 'x', x); numPoints = 200; xvec = linspace(1,10,numPoints);...

alrededor de 2 años hace | 0

| aceptada

Respondida
how to use for loop in equation
Hi Shiv, up to my understanding you want to execute a kind of parametric study, basing on a parameter A (and perhaps in future...

alrededor de 2 años hace | 0

Respondida
Why the solution is higher than the initial conditions in a model without heatsource?
Dear YL, In my opinion which is observed in the figure is just a uniform temperature T = 50, plus a numerical noise, which may...

alrededor de 2 años hace | 0

| aceptada

Respondida
How to solve trigonometric equation x*cos(x)+sin(x)=0 with function fsolve?
Hi Attho, since your function depends on one varialbe only, you can solve more easily with fzero: fun = @(x) x.*cos(x)+sin(x)...

alrededor de 2 años hace | 1

| aceptada

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

alrededor de 2 años hace | 0

| aceptada

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

alrededor de 2 años hace | 2

| aceptada

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

alrededor de 2 años hace | 0

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

alrededor de 2 años hace | 1

| aceptada

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

alrededor de 2 años hace | 0

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

alrededor de 2 años hace | 0

| aceptada

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

alrededor de 2 años hace | 0

| aceptada

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

alrededor de 2 años hace | 0

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

alrededor de 2 años hace | 0

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

alrededor de 2 años hace | 0

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

alrededor de 2 años hace | 1

| aceptada

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

alrededor de 2 años hace | 0

| aceptada

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

alrededor de 2 años hace | 0

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

alrededor de 2 años hace | 10

Pregunta


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

más de 2 años hace | 1 respuesta | 0

1

respuesta

Enviada


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

alrededor de 3 años hace | 1 descarga |

Thumbnail

Pregunta


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

casi 4 años hace | 2 respuestas | 1

2

respuestas