Respondida
how to define 4 bit Enumerated value and a nibble(4 bits) in Matlab
Use a number between 0 and 15. n = 8; To convert to binary nbin = dec2bin(n) - '0'; dec2bin return a string, th...

alrededor de 10 años hace | 0

| aceptada

Respondida
given a natural number N, find a natural number n such that max ((n!)^2 <=N)
N = 1400; n = 1; while prod(1:n)^2 < N n = n + 1; end; n = n - 1

alrededor de 10 años hace | 0

Respondida
Display plot on image
x = cumsum(Volt_and_time(2,:)); y = cumsum(Volt_and_time(1,:)); overlayplot(x,y,image, 'fitbinary') using my function...

alrededor de 10 años hace | 0

Respondida
How to count the number of zero subcells in a cell?
If you have a cell array of matrices: C{1,1} = ones(1,32); C{1,2} = 2*ones(1,32); C{2,1} = zeros(1,32); C{2,2} = z...

alrededor de 10 años hace | 0

Respondida
Speed up Gaussian Fitting of many points
So the problem is the fitting. There are some alternative methods if you google "matlab fit 2D gaussian", like <http://www.mathw...

alrededor de 10 años hace | 0

Respondida
Applying Matlab variables in a UNIX command
You can create the folder in Matlab as follows: path = '/User/foobar/Matlab/xxx'; folder = 'test'; mkdir(fullfile(path, ...

alrededor de 10 años hace | 0

Respondida
Change Minimum Distance of Zero Matrix
m = [0 0 0 0 1 2 2 0 0 5 3 4 5 0 0 0 0 0 9 9 0 0 0]; custom_value = 1; ind = diff([1 m 1] == 0); i1 = find(ind == 1);...

alrededor de 10 años hace | 0

Respondida
Conversion of 3d array to 2d array in text file
%% define some constants filename = 'data1.txt'; NLongitude = 19; NLatitude = 17; NStdPressureLev = 24; %% ...

alrededor de 10 años hace | 1

Respondida
Error using surf plot
You can use K = zeros(length(yf), length(xf)); % note that yf is first, xf is second because ...

alrededor de 10 años hace | 1

| aceptada

Respondida
I want draw a graph correctly
With your axis command you cut off the z values at 0 (with the third 0 in axis([0 2 0 2 0 6]). Instead, use: Z = F3(X,Y); ...

alrededor de 10 años hace | 0

Respondida
How i add a line in 2d plot
You can plot the horizontal line using line([min(xlim) max(xlim)], [4 4], 'Color', 'r', 'LineStyle', '--') If you have co...

alrededor de 10 años hace | 0

Respondida
Recieving error that states "Vectors must be the same length".
By changing the increment you have changed the length of X (from 5 to 7 in your case). If Y matches X (with 5 elements), it does...

alrededor de 10 años hace | 0

Respondida
Matlab Plotting Code erroe
You have to squeeze the singleton dimension: n = 10; A = rand(5,6,n); plot(squeeze(A(2,3,:)))

alrededor de 10 años hace | 0

Respondida
How to detect the edge of the photo
You can use imfindcircles to detect the circle, and then set all points outside the circle to black. See <http://stackoverflow.c...

alrededor de 10 años hace | 0

Respondida
what is the meaning of gold standard in DRIVE data base?
The data base states The set of 40 images has been divided into a training and a test set, both containing 20 images. Fo...

más de 10 años hace | 0

| aceptada

Respondida
Hey people :) How would i write a Matlab script that asks a group of up to 40 members to enter their height (in cm) and their weight (in kg)?
N = 40; for i = 1:N height(i) = input('Please enter your height (in cm) >> '); weight(i) = input('Please enter y...

más de 10 años hace | 1

Respondida
Find submatrix with the maximum sum
You can set maxval = -Inf; before the loop and then compare if the sum of the current submatrix is greater than maxval: if so, s...

más de 10 años hace | 0

Respondida
How to compare results from three different programs together
nodes = 100; % or how many nodes you want d1 = dtdma2(nodes); d2 = stdma2(nodes); d3 = csma2(nodes); plot(1:nodes, d1, ...

más de 10 años hace | 0

Respondida
how can i get function of sinh in taylor series
The loop runs over k, but you use n in the formula.

más de 10 años hace | 1

Respondida
How to multiply a (2 by 2) matrix M with M [i.e M*M'] where the elements of the matrix M are also matrices ?
M={a1.*x, a2.*y; a3.*x, a4.*y}; A = cellfun(@(x) x*x', M, 'UniformOutput', false);

más de 10 años hace | 0

Respondida
Manipulate values on axes MATLAB
set(gca, 'XTickLabel', 0:10)

más de 10 años hace | 0

Respondida
[Beginner] MATLAB : Error ??? Index exceeds matrix dimensions but I can't fix it
What does size(zb_gt) return before those lines? Presumably it has to few rows.

más de 10 años hace | 0

Respondida
Base workspace variable name
S = whos; varname = {S.name};

más de 10 años hace | 0

| aceptada

Respondida
how to count non breaking ones from matrix?
For a single column, use diffcol = diff([0; col; 0]); n = max(find(diffcol==-1)-find(diffcol==1)); Just loop over eac...

más de 10 años hace | 0

| aceptada

Respondida
Using regexp in a repetitive manner
line = 'type="line" coords="461,461,461,487,461,487,461,489,462,490,462,492,463,493,464,494,465,495,467,495,468,496,470,496,47...

más de 10 años hace | 0

Respondida
In which quadrant is a point?
If cx, cy is the center of your circle, you first determine the angle between point px, py and relative to the center: alpha...

más de 10 años hace | 3

Respondida
Save workspace to a specific folder using regular expression
imagename = ... %whatever you use to extract the imagename filename = [imagename '.mat']; save(fullfile(newfullpath, filena...

más de 10 años hace | 2

| aceptada

Respondida
how to input values in a 2D matrix using a nested for loop of size 5*5?
for i = 1:5 for j = 1:5 A(i,j) = input(sprintf('please enter value (%d, %d) >> ', i, j)) end end

más de 10 años hace | 2

| aceptada

Respondida
how to copy multiple files from a source folder to a destination folder
On Unix/Linux/MacOS, to copy all files that have a single character followed by at.txt, you can use system('cp ?at.txt newf...

más de 10 años hace | 0

Cargar más