Answered
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);...

2 years ago | 0

| accepted

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

2 years ago | 0

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

2 years ago | 0

| accepted

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

2 years ago | 1

| accepted

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

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

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

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

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

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

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

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

2 years 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;...

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

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

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

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

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

2 years ago | 10

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

2 years ago | 1 answer | 0

1

answer

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

4 years ago | 2 answers | 1

2

answers