Respondida
Determining which flags are set from a hexadecimal input
function flags = which_bit_set(hex_str) x = dec2bin(hex2dec('hex_str')); for i = 1:length(x) disp(['Bit ' int2s...

más de 13 años hace | 0

| aceptada

Respondida
downloading/read gmail mensages
If you have the Database Toolbox you can follow this HowTo http://blog.cordiner.net/2009/12/16/accessing-your-gmail-messages-...

más de 13 años hace | 0

| aceptada

Respondida
how can I create a new structure based on a existing one?
If you want to build a structure A of class struct (such that >> class(A) yields 'ans = struct') you cannot do it because the ...

más de 13 años hace | 0

Respondida
Building legends with extraordinary properties
Example 1 x = -pi:0.1:pi; h = plot(x, sin(x), 'r', x, cos(x), 'b', x, x, 'k'); legend(h([1 3]), {'sin' 'x'}) Example ...

más de 13 años hace | 0

| aceptada

Respondida
Help Please : 3 for loops && 3 Dimensional Matrix want them in a 2D GUI Table
You can extract a 2D matrix A out of a 3D matrix PD using A = PD(:, :, 1); or A = squeeze(PD(i, :, :)) or ...

más de 13 años hace | 1

| aceptada

Respondida
Kmeans clustering in YUV image space
[idx C]=kmeans([U(:) V(:)],NoColors,'EmptyAction','singleton');

más de 13 años hace | 0

Respondida
Vectorize a code that finds the roots of polynomials stored in matrices
The roots function only accepts vectors. You may speed up your code by getting rid of the two intermediate variables poly_ma...

más de 13 años hace | 0

| aceptada

Respondida
intersection between two cones
Two circles intersect if their distance is smaller than the sum of their radii sqrt((x1 - x2)^2 + (y1 - y2)^2)) < r1 + r2 ...

más de 13 años hace | 0

Respondida
Can I combine character data and numerical data in a fprintf statement
The Matlab documentation says: Combining character values with double values yields a character matrix. MATLAB converts the...

más de 13 años hace | 0

Respondida
How to make a set of RGB color combinations
This is what you get if you tile the RGB cube uniformly N = 100; n = ceil(N^(1/3)); % 3D color volume x = l...

más de 13 años hace | 0

| aceptada

Respondida
Working with .mat file format and need to alter it according to requirements.
If the 60 mat files are in your current directory and the 6 parameters are named var1, var2, ... ,var6: d = dir('*.mat'); ...

más de 13 años hace | 0

| aceptada

Respondida
I want print the matrix, in orginal matrix from but it displays it as a series of coloumns.
It's easy as disp(H_Mat)

más de 13 años hace | 0

| aceptada

Respondida
Sampling values from step signal and concatenating them into a vector (Mx1 array into 1xM array)
row = [1;2;3;4;5;6;7]; column = row';

más de 13 años hace | 0

Respondida
finding the number of consecutive data
This should do the job: obs1 = observations(1); Ncons = 1; for i = 2:numel(observations) if observations(i) == ...

más de 13 años hace | 0

| aceptada

Respondida
replacing string variables with others
newtextinfo = textinfo; idx =find(strcmp(textinfo, 'A')); for i=1:numel(idx) newtextinfo{i} = 'SE1'; end

más de 13 años hace | 0

Respondida
How to trace back a subfunction
Why don't you use something like solution1 = 20 + d(); solution2 = 20 + e(); if solution1 < solution2 f = so...

más de 13 años hace | 0

Respondida
choosing unique elements in the order that they appear in a column of a cell vector
You can to it "by feet" unique_rows = 1; for i = 2:size(Out, 1) equals_row = 0; for j = 1:numel(unique_rows) ...

más de 13 años hace | 0

Respondida
matrix normalization in matlab
To normalize a matrix such that all values fall in the range [0, 1] use Anorm = (A - min2(A))/(max2(A) - min2(A));

más de 13 años hace | 3

| aceptada

Respondida
simple elseif loop doesn't work
The problem occurs because 0 < T < 100 is evaluated for T = 110 as (0 < T) < 100 1 < 100 1 Use ...

más de 13 años hace | 0

| aceptada

Respondida
open and read a txt file
for i = setdiff(20:80, [22 79])

más de 13 años hace | 0

| aceptada

Respondida
Matlab matrix operations without loops
Ytemp = [1:M_MAX]'*[1:N_MAX];

más de 13 años hace | 0

Respondida
Best Logic for Removing Unwanted Data from the Beginning of an Array
It's a one liner: A(find(diff(find(A > 1.5*min(A))) > 1)+1:end) Note that I've replaced your 120% criterium with 150% = 6...

más de 13 años hace | 0

Respondida
Headings for graphs generated in a loop
myheadings = {'first title' 'seccond title' 'yet another title' 'and so one'}; for i = 1:4 plot(rand(1,10)) ...

más de 13 años hace | 0

| aceptada

Respondida
Arrange linear equation w.r.t variables
The columns are a, b, c, d and the values in row 1, 2, 3 are the coefficients in your equation 1, 2, 3. Use zero if there is no ...

más de 13 años hace | 0

Respondida
Draw partial white border line in an object in grayscale
help imfreehand

más de 13 años hace | 0

Respondida
How to: Matrix question empty column
Maybe you can achieve your goal by inserting columns of NaNs X = ones(10); X(:, [3 6]) = nan(10,2);

más de 13 años hace | 0

Respondida
Plot a 3-D bar graph and coloring
help bar3

más de 13 años hace | 0

Respondida
Vertically stacked subplots with x-axis labels only at the bottom
http://www.mathworks.com/matlabcentral/fileexchange/26332-labeledgesubplots

más de 13 años hace | 0

Respondida
3D image from 10rgb slices
Because RGB is already 3D, you can combine them in the fourth dimension I1 = ones(10, 10, 3); I2 = 2*ones(10, 10, 3);...

más de 13 años hace | 0

Respondida
Select specific digits of a number
x = 953; s = num2str(x); y1 = sscanf(s(1), '%d') y2 = sscanf(s(2:end), '%d')

más de 13 años hace | 1

Cargar más