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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

Risolto


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

oltre 11 anni fa

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

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

oltre 11 anni fa | 1

| accettato

Inviato


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

oltre 11 anni fa | 1 download |

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

oltre 11 anni fa | 1

Risolto


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

oltre 11 anni fa

Risolto


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]

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

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

oltre 11 anni fa | 0

Inviato


folderFiles.m
Reads filename contents of a folder.

oltre 11 anni fa | 2 download |

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Risolto


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

oltre 11 anni fa

Carica altro