A résolu


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

plus de 11 ans il y a

Réponse apportée
How to do this: Multivariate Interpolation with random data (non-gridded)
vq = griddata(x1,x2,y,x10,x20) hth, George Papazafeiropoulos

environ 12 ans il y a | 0

Réponse apportée
how to write the nonlinear constraints in fmincon
Define the constraint function as follows: function [C,Ceq]=confun(x) F1=... F2=... F3=... F4=... F5=... ...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
I have n points (x ,y coordinates known) of two parallel lines (not perfect straight ) want to draw lines from first boundary points to second boundary with proper slope . Also want to find min & max distance between the lines.
BOUN1=[ 191 220 189 221 188 222 186 223 186 224 185 225 185 226 185 227 185 228 186 229 187 230 187 231 187 232 187 233 187 23...

environ 12 ans il y a | 0

Réponse apportée
How to solve linear and non linear equation system?
For 14 equations with 14 unknowns, try fsolve, or any other iterative solver (Newton-Raphson, Arc-Length, line search, etc...) ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Defining a function (including vector dot product) for all the points in 3D
% data dx = 0.1; dy = 0.5; dz = 0.1; [x, y, z] = meshgrid( (1:100)*dx, (1:100)*dy, (1:100)*dz ); X = [x(:) y(:)...

environ 12 ans il y a | 0

Réponse apportée
Remove NaN from a matrix
ind=sum(~isnan(B)); B(isnan(B))=0; mean=sum(B)./ind

environ 12 ans il y a | 2

Réponse apportée
find min or max value element from more than two matrices
% data matrix1=rand(2); matrix2=rand(3); matrix3=rand(4); % engine c=nan(4,4,3); c(1:2,1:2,1)=matrix1; c(...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
How to get the output to a variable
Try this after running your code: fit1.Constant fit1.GARCH{1} fit1.ARCH{1} fit1.Offset

environ 12 ans il y a | 1

| A accepté

Réponse apportée
how to select higher value in a matrix and change that by introducing an error?
Are you looking for something like this? a= [ 0.83 0.85 0.97 0.1 0.95 0.93 0.2; 0.2 0.12 0.12 0.76 0.77 0.78 0.25; ...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
i want to save all the value of variable a from all iterations into a single matrix ?
% initial data f=[1 3 5 7 9 11; 2 4 6 8 10 12]; b=[1 2;3 4]; % engine b=b'; [nn,n]=size(f); [m,c]=size(b...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Draw a line on a 2D plot at a particular x and y values
x=linspace(0,4); y=x.^2; plot(x,y); line([3;3],[0;9],'linestyle','--'); line([0;3],[9;9],'linestyle','--');

environ 12 ans il y a | 2

| A accepté

A résolu


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

environ 12 ans il y a

Réponse apportée
how to make vector sum to one?
W'*ones(N,1)=1

environ 12 ans il y a | 2

Réponse apportée
how to use multiple linear equality constraints
Convert them into matrix form and look about the input arguments Aeq and Beq in the documentation of fmincon.

environ 12 ans il y a | 1

Réponse apportée
Extend a vector by extending its elements
If X is a column vector: % initial data d=10; % engine X=(1:d)'; ind=ones(d^2,1); ind(d+1:d:d^2)=1-d; % r...

environ 12 ans il y a | 0

Réponse apportée
How to detect if a line intersects with itself?
% initial data A = [1 1; 1 2; 2 2; 2 1; 3 1]; tour_order = [2; 1; 4; 3; 5; 2]; % engine sizeA=size(A,1); meanA=...

environ 12 ans il y a | 0

Réponse apportée
Testing for an Integer and displaying that value.
% initial data ll=99; ul=500; f=5; % engine lb=floor(ll/f); if lb/2~=floor(lb/2) lb=lb+1; end r...

environ 12 ans il y a | 0

Réponse apportée
Reduce dimensionality using indices
This is an alternative solution which does not contain external functions, thanks to Jos! % initial data A=ceil(10*rand(...

environ 12 ans il y a | 1

Réponse apportée
Reduce dimensionality using indices
After specifying A... d=[1 2 3; 1 1 3; 2 1 1]; B=zeros(3,3,3); B(:,:,1)=(d==1); B(:,:,2)=2*(d==2); ...

environ 12 ans il y a | 0

Réponse apportée
Multiple linear regression nonlinear constraints with fmincon
As an example for doing this, I give you an example. Define a function as follows: function er = objfun(a) global y x ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Help me about the error with symsum function to calculate the sum of series ?
Maybe because there is not any analytical formula which gives this sum. Can this function be integrated in an analytic way? I su...

environ 12 ans il y a | 0

Réponse apportée
Matlab problem: How to calculate a rough, approximate, derivative vector by using the following formula?
x=-10:10; y=x.^2; Yprimenum=diff(y)./diff(x)

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Making each element of a row vector equal to zero
You can create a new vector with all zeros by typing the command: new=zeros(1,100) or by using a for loop: for I=1:...

environ 12 ans il y a | 0

Réponse apportée
detect consecutive duplicates in a structure
A(1).a=1 A(2).a=1 A(3).a=3 A(1).b=true A(2).b=true A(3).b=false for ii=2:3 ttest(ii-1)=A(ii).a==A...

environ 12 ans il y a | 0

Réponse apportée
Different length array comparison and replacements
% data A=[445; 874]; B= [265; 446; 744; 872; 875]; % engine AA=A(:,ones(1,size(...

environ 12 ans il y a | 0

Réponse apportée
Extra term in "min" function in while loop
The extra ,DC1(1,j) bit is the next command. You can erase the initial comma and press enter to get it in the next lin...

environ 12 ans il y a | 1

Réponse apportée
Finding x & y-values that maximize an expression!!!!
The expression for J does not have any maxima. This can be seen easily by geometric interpretation of the formula. J can be mini...

environ 12 ans il y a | 0

Réponse apportée
fft normalization and parseval
In the following code: var1=128; h=complex(randi([-1 1],var1,1),randi([-1 1],var1,1)); h=h/std(h); % no h is normaliz...

environ 12 ans il y a | 0

Réponse apportée
HOW TO ACCESS THE FOLLOWING ELEMENTS FROM THE GIVEN ARRAY
a=[ 0 0 0.3013 1.1305; 1.0000 2.0000 0.7390 0.4223; 3.0000 2.0000 1.1305 ...

environ 12 ans il y a | 0

Charger plus