Réponse apportée
Find first row with certain value in x2 array
idx = A(:, 1) == 10; % find the index that 1st column = 10 b = A(idx, 2); % extract the corresponding data in 2nd c...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Plotted a graph, want to specify label position relative to node
One workaround is to delete the NodeLabel and use text (and then you can control the position): ax.NodeLabel={}; htext = text(...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
MTIMES (*) is not fully supported for integer classes. At least one argument must be scalar
Try convert H to double first. D=mod(double(H)*V,2);

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How can I overlap multiple lines on one plot in an iterative loop?
take the statement "figure()" just before the loop so that all plots are on the same figure the plot command "plot(p, 'g') shou...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to solve for unknown variables in a matrix using Cramer's Rule?
Matlab way of solving a linear system of equations: Ax = b A = magic(5); % matrix A b = rand(5,1); % vector b x =...

environ 5 ans il y a | 0

Réponse apportée
Average over particular ranges of one dimension in matrix
x = rand(22, 40, 24, 24); % your input data y = zeros(22, 4, 24, 24); % initialize your output y(:, 1, :, :) = mean(x(:, 1...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
difference between a= and a(:)=
a(:) = 1 will not change the size of a, but assigne 1 to every element of a (assume a has been declared before, such as a = zero...

environ 5 ans il y a | 1

| A accepté

A résolu


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

environ 5 ans il y a

A résolu


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

environ 5 ans il y a

A résolu


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

environ 5 ans il y a

A résolu


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

environ 5 ans il y a

A résolu


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

environ 5 ans il y a

A résolu


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

environ 5 ans il y a

A résolu


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

environ 5 ans il y a

Réponse apportée
my attempt to generate and plot some signals.. please tell me whats wrong here!
The period of your signals, x1, xb and xc, is 1/5 (5 is the frequency for x1). If you change the 0.004 into 1/5, you should hav...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Computing the mean over 3 numbers in a matrix
A = rand(5000, 51); % your data A1 = reshape(A, [5000 3 17]); % reshape the 51 element by 3x17 array meanA = mean(A, 2); % ...

environ 5 ans il y a | 0

Réponse apportée
Create guess and Check loop in matlab
y= @(x) (2*x)-((2*x.^2)*(1-exp(-1./x))) - 0.211; % define the function f(x)=0 x = fsolve(y, 0); % here x0 = 0; help fs...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Opening multipage image file, saved as .bin file.
fid = fopen('your_binary_file', 'b'); x = fread(fid, inf, 'int16'); % it could be 'uint16', depending on how data is written ...

environ 5 ans il y a | 1

Réponse apportée
Removing gray border from imshow plot
try the following command imwrite(X,MAP,FILENAME,FMT) where X is the data matrix you have (it should be real), MAP is the col...

environ 5 ans il y a | 0

A résolu


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

environ 5 ans il y a

A résolu


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

environ 5 ans il y a

A résolu


Convert radians to degrees
Given input in radians, output to degrees

environ 5 ans il y a

A résolu


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

environ 5 ans il y a

A résolu


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

environ 5 ans il y a

A résolu


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

environ 5 ans il y a

A résolu


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

environ 5 ans il y a

A résolu


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

environ 5 ans il y a

A résolu


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

environ 5 ans il y a

A résolu


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

environ 5 ans il y a

A résolu


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

environ 5 ans il y a

Charger plus