Risposto
adding numbers in an M file
sum(f) (after the loop)

oltre 15 anni fa | 0

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 1

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

oltre 15 anni fa | 1

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

Risposto
Combining 2 different models
out1 = model1(in1); out2 = model2(out1,otherVariables);

oltre 15 anni fa | 0

Risposto
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'(...

oltre 15 anni fa | 0

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 5

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

oltre 15 anni fa | 2

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 1

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 1

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

oltre 15 anni fa | 0

| accettato

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

oltre 15 anni fa | 0

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

oltre 15 anni fa | 0

| accettato

Carica altro