A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

plus de 5 ans il y a

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

plus de 5 ans il y a

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

plus de 5 ans il y a

A résolu


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

plus de 5 ans il y a

A résolu


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

plus de 5 ans il y a

A résolu


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

plus de 5 ans il y a

A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

plus de 5 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

plus de 5 ans il y a

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

plus de 5 ans il y a

A résolu


Return area of square
Side of square=input=a Area=output=b

plus de 5 ans il y a

A résolu


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

plus de 5 ans il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

plus de 5 ans il y a

Réponse apportée
Is there a way to obtain the indices of the training, validation and test datasets in NN pattern recognition?
You can see those indices in the ouput data of train command. [net,tr] = train(net,x,t); % net is trained network, tr in traini...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
What did I do wrong here?
In your function RK4 line 8 to 11, you have two inputs for f function while the f function has only one input value, thus "too m...

plus de 5 ans il y a | 0

Réponse apportée
how to use reshape ?
try this: B = reshape(A,339,[]); % A is the original matrix, B is the reshaped matrix

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Extract a row from a 2D matrix if any of its element matches with elements in other 1D matrix
Try this: idx = []; for i = 1:size(A,1) if any(ismember(A(i,:),B)) idx = [idx i]; end end C = A(idx,:);

plus de 5 ans il y a | 0

Réponse apportée
How do I implement multi objective optimization using the default in-built 'particleswarm' function in Matlab ?
https://www.mathworks.com/matlabcentral/fileexchange/62074-multi-objective-particle-swarm-optimization-mopso All credits to the...

plus de 5 ans il y a | 0

A soumis


2D Heat Transfer FEM
FEM script example for 2D heat problem using T3 element

plus de 5 ans il y a | 4 téléchargements |

5.0 / 5
Thumbnail

Question


Does Matlab has an adaptive Neural Network (architecture and functions)?
In standard learning, we usually do multiple attempts to find the most optimum ANN architecture (nodes and layers) and functions...

plus de 5 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
How to solve mass spring damper over frequency (differential equation)?
Equation of motion is time-dependant equation. Perhaps what you mean is Response Spectrum (frequency-based response data)? This ...

plus de 5 ans il y a | 0

Réponse apportée
Writing an Optimization Problem
I am not sure why yours doesnt work, but it works if the functions are written in array form like this: clear fun = @(x) (x(1)...

plus de 5 ans il y a | 1

Réponse apportée
exitFlag meaning in GA solver
As I know, good solution is when it converges, the change of few last iteration does not improves (exit flag 1, 3). Or when so...

presque 6 ans il y a | 2

| A accepté

Réponse apportée
Find indexs of minimum in 4-D matrix.
Maybe linear means the index ordered in from high dimension to one dimension. For example, for 2D matrix with 2 rows and 3 colum...

presque 6 ans il y a | 0

Réponse apportée
gaplotpareto not supported for this algorithm
Have you tried this advice? https://www.mathworks.com/matlabcentral/answers/63086-gaplotpareto-for-3-objective-functions

presque 6 ans il y a | 0

| A accepté

Question


Add new line in middle of line of a text file
I have a bug in my text file. There should be new line at this blue line: I have tried to code to fix this: subdir = 'TCLFil...

presque 6 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
How to fix timestep in this code?
You can check your equation part by part to check whether your code or calculation is correct. For example, for n=2: Ve*dm = 22...

presque 6 ans il y a | 0

Réponse apportée
How do I solve an eigenvector for the amplitude matrix 'A' mode
Are you trying to make eigendecomposition of mass & stiffness matrix? Try this: [U,Omega2] = eig(inv(M)*K); % Eigen decomp...

presque 6 ans il y a | 0

Réponse apportée
Finding Angle between 2 points
Is this what you mean? P1 = [10 210]; P2 = [140 210]; Z0 = [(P1(1)+P2(1))/2 225]; % Reference point, assuming it is in the m...

presque 6 ans il y a | 0

Réponse apportée
Saving / Showing Value of Variables in Genetic Algorithms
This guy here give an example output function to obtain variable in each iteration on a pattern search optimization. Maybe it is...

presque 6 ans il y a | 0

Réponse apportée
why points examined in Pattern Search exceed the lower or Upper bounds and is there any way to avoid this?
What is your initial point and initial mesh size? Perhaps these already exceeds your bounds. Edit: Hmm, what if you normalize ...

presque 6 ans il y a | 0

| A accepté

Charger plus