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

más de 11 años hace | 0

Respondida
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 = '...

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

Respondida
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');

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

Respondida
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,'...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

Resuelto


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

más de 11 años hace

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

más de 11 años hace | 0

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

más de 11 años hace | 0

Respondida
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 (...

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

Enviada


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

más de 11 años hace | 1 descarga |

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

más de 11 años hace | 1

Resuelto


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

más de 11 años hace

Resuelto


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]

más de 11 años hace

Resuelto


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

más de 11 años hace

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

más de 11 años hace | 0

Enviada


folderFiles.m
Reads filename contents of a folder.

más de 11 años hace | 2 descargas |

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Cargar más