Réponse apportée
how to put the obtained 'k' value in a separate array?
Simply use D1= overload(k) If (k) was not a positive integer you cannot use it as a matrix index. It is the function ...

plus de 11 ans il y a | 0

Réponse apportée
how to assign a variable using a string
Try (genvarname) with (eval) functions. Example (alter the example below to your use, i.e., instead of eval([b]) use eval([b = '...

plus de 11 ans il y a | 0

Réponse apportée
Making a magic square matrix singular
I don't think details are required since A=magic(n)-ones(n)*((1+n*n)/2) is changed into an antisymmetric matrix, any such...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Please help me implement the equations: Pij = (f(i,j))/(∑_(i=1)^M∑_(j=1)^N〖f(i,j)〗) and H = ─∑_(i=1)^M∑_(j=1)^NPijlog2Pij
It would be something like (provide your own functions for f, and set up the values of M and N), clc;clear;close; % set u...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to calculate the determinant of a symbolic matrix 5x5
I don't think it is possible to concatenate a matrix such as K if A-F have sizes > (1,1), thus no value of the determinant exist...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I assign a matrix column as my x or y values so that can plot them?
Use the basic matrix notation, the colon operator is very helpful in such cases. Example: y=magic(5) y = 17 ...

plus de 11 ans il y a | 1

Réponse apportée
Plotting Legends of Rows of a Matrix ???
A=[1 2 3 4; 1 2 3 5; 2 3 4 5]; plot(A) C=num2str(A); H=legend(C); set(H,'Interpreter','none');

plus de 11 ans il y a | 0

Réponse apportée
background suppression from any real time image
I've tried (Embedded Matlab Function) blocks once for a similar thing, and used my own program to handle the output.

plus de 11 ans il y a | 0

Réponse apportée
Why does the function real return expressions containing i ?
Check the math, e.g.: ... TheEq=w*1i*eye(n)-A-B1*e1-B2*e2- B3*(cos(tau3*w)-1i*sin(tau3*w))-B4*cos(tau4*w)-1i*sin(tau4...

plus de 11 ans il y a | 0

Réponse apportée
How do i interpolate a large matrix of data thats not in ascending order?
There are few interpolation techniques in Matlab. You can start with the functions interp1q % for simple 1-D interpolation...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Can rectangularized data be achieved by modifying a text file with MATLAB?
Hi Brad. Instead of InputText=textscan(fid,'%s',1,'delimiter','\n'); Try this out [InputText, dn1]=fscanf(fid,'...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Make error when using a embedded matlab function
Probably there is a simulink model with the same name. Try to use a slightly different function name for youe swap function such...

plus de 11 ans il y a | 0

A résolu


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

plus de 11 ans il y a

Réponse apportée
Check each pixel for a specific color
Try I=imread('imageHere'); [a,b,c]=size(I); % change is needed for i=1:a for j=1:b F(i,j)=all(I(i,j)==0); e...

plus de 11 ans il y a | 0

Réponse apportée
how to resize a given signal?
Use reshape Y=function(X,m,n) It works for any input matrix (X) with number of elements (m x n). The output is Y with m...

plus de 11 ans il y a | 0

Réponse apportée
large text file reading
Try this and note to specify your filename input (FIN) and filename output (FOUT) properly, i.e., FOUT must be with extension (...

plus de 11 ans il y a | 0

Réponse apportée
How to convert a string to a symbol ?
@Jacky (the actual expression is : (x>=1 & x<9)). This is the question! This is a logical comparison statement. The meaning...

plus de 11 ans il y a | 1

| A accepté

A soumis


immovieFolder.m
IMMOVIEFOLDER records a movie from a group of image files in a specified folder, and plays it.

plus de 11 ans il y a | 1 téléchargement |

Réponse apportée
How to convert a string to a symbol ?
sym and syms are used to declare symbolic variables, see: <http://www.mathworks.com/help/symbolic/symbolic-variables-express...

plus de 11 ans il y a | 1

A résolu


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

plus de 11 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 11 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 11 ans il y a

Réponse apportée
can someone explain to me what is this entire code means?
This code finds log10 of the values of some vector (x). The line: y = -Inf*ones(size(x)); is meaningless in this part o...

plus de 11 ans il y a | 0

A soumis


folderFiles.m
Reads filename contents of a folder.

plus de 11 ans il y a | 2 téléchargements |

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

plus de 11 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]; and ...

plus de 11 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 11 ans il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

plus de 11 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 11 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 11 ans il y a

Charger plus