Réponse apportée
adding numbers in an M file
sum(f) (after the loop)

plus de 15 ans il y a | 0

Réponse apportée
Matrix of Galois Field Elements
You must have a different version of MATLAB than I do (2010b). The error message I get is: ??? Error using ==> gf.gf at 66 X ...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Solving a differential equation
If your equations contain only linear combinations of the derivatives, you could formulate it as a mass matrix problem |M(t,y)y'...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
evaluate expression
It would be simpler to provide |y| and solve for |x|: y = -1:0.01:1; x = y.*exp(- (1-y)./(A*y)*B ); In plotting this, y...

plus de 15 ans il y a | 0

Réponse apportée
Double sigmoid fit
Here is an example of how you could use |cfittool| to create a sigmoid fit. First, enter these commands in the Command Window. ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Plot symbolic polynomial
This plots the real part of |y| against |x|: syms x y ezplot(y-x^2-1i-2) Of course, it looks just the same as syms x y ez...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Do you suffer from keyboard latency in this forum?
Here is an approach that I hope will make life easier for people with keyboard latency that is not too extreme. I used it to wri...

plus de 15 ans il y a | 1

Réponse apportée
Solving a differential equation
I have been floundering a bit with this problem, but now I see what you need: a variable z = [y; g] with y'(t) = (g-a)*y(t) ...

plus de 15 ans il y a | 1

Réponse apportée
Apply colormap to plot(x,y)
To create the colormap, you could use |spectrumRGB| in <http://www.mathworks.com/matlabcentral/fileexchange/7021 Spectral and XY...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Availability PDF
A PDF doesn't have to be restricted to 100% (or 1, as I usually think of it) - as long as the integral of the PDF is 1, it's o.k...

plus de 15 ans il y a | 0

Réponse apportée
Combining 2 different models
out1 = model1(in1); out2 = model2(out1,otherVariables);

plus de 15 ans il y a | 0

Réponse apportée
Solving a differential equation
If I understand your question, you have a delay differential equation with one variable y(t), and your equation has the form y'(...

plus de 15 ans il y a | 0

Réponse apportée
How to avoid NaN with numerical integration (quadrature)
If you set a debugging breakpoint at the call where the warning occurs, then Futpd(LimInf_) ans = NaN *EDIT*: The ...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Second derivative of Gaussian function
Sure: syms yo A w X c Gaussian=yo+A/w*exp(-((X-c)/w)^2); diff(Gaussian,w,2) I have cleaned up some redundancy in your expres...

plus de 15 ans il y a | 0

Réponse apportée
A problem using ode23s and lsqcurvefit
You need to learn some debugging techniques. Look at <http://www.mathworks.com/help/techdoc/matlab_env/brqxeeu-151.html Preventi...

plus de 15 ans il y a | 0

Réponse apportée
pde solver
This would be hard to solve numerically because it is ill-defined. Any function of the form |f(c*z-b*t)| is a solution.

plus de 15 ans il y a | 0

Réponse apportée
Minimization falls in wrong minima
This problem seems under-constrained. A rotation matrix |R| should satisfy |R.' = inv( R )| and should have a total of three ind...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Output values from a loop
Do you use the MATLAB Editor? You should because it has some very useful diagnostics. Look at the right margin of the editor and...

plus de 15 ans il y a | 0

Réponse apportée
Create plot with specified handle?
I doubt it. If you could create one plot with handle |32|, you could create another, and then it wouldn't be unique any more. Th...

plus de 15 ans il y a | 0

Réponse apportée
Odd triangles using Matlab's contour and contourf functions
I think your main problem is that there aren't many data, so it is hard to make nice contours out of it. Look at the bit-mapped ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
plot transperant 3d sphere
As you suggested yourself, you can use |sphere| to generate the sphere: r = 24.04; [x,y,z] = sphere(50); x0 = 16.5; y0 = 14.8...

plus de 15 ans il y a | 5

Réponse apportée
Any idea on how to create a n by n square matrix.
Use |meshgrid|: npanels=3; %number of panels dP=2.4/npanels; %equal length panels P=[-1.2+(2.4/npanels)/2:dP:1.2-(2.4/npa...

plus de 15 ans il y a | 2

Réponse apportée
How to multiply a vector with each column of a matrix most efficiently?
I don't find that. If my input is clear t=(1:1000)'; A=rand(length(t),200); [n,m] = size(A); %% 1. Looping tic for...

plus de 15 ans il y a | 0

Réponse apportée
I need help.
Thank you for formatting it. Do you use the MATLAB editor? It displays syntax errors on the right margin as red lines. You can ...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Why is it used?
As written, your code cannot possibly run because of some of the spaces. I will substitute underlines: I=find(and(dR > min...

plus de 15 ans il y a | 0

Réponse apportée
resolution of PDE
Here is one error: in this line, pl = [C1(1);q0-Cl(2)]; the first |C1| is |C| followed by the numeral |1|, but it should...

plus de 15 ans il y a | 0

Réponse apportée
Using MATLAB with Chessboard arrangements problem
If the positions don't need to be legal, you can use combinatorial calculations. For example, let's first suppose that you can't...

plus de 15 ans il y a | 1

Réponse apportée
Load a Text File in a GUI
Based on your description of the file, this code might be able to read the file: fid = fopen('testInput.txt'); data2 =...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Incorrect equilibrium values using fsolve
The answer provided by |fsolve| looks better than yours: >> odefun_dynamic_droop([2.6605e-07 3.6300e-06 2.5009e-06]) a...

plus de 15 ans il y a | 0

Réponse apportée
Find the Error - FZero Function. Constant loop.
The root of the problem is that you're trying to solve for |NCons = NFirm| by minimizing each of these functions at each step. T...

plus de 15 ans il y a | 0

| A accepté

Charger plus