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

13 years ago | 0

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 1

| accepted

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

| accepted

Answered
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'); ...

13 years ago | 0

| accepted

Answered
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)

13 years ago | 0

| accepted

Answered
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';

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

Answered
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));

13 years ago | 3

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

Answered
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);

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

Answered
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);...

13 years ago | 0

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

13 years ago | 1

Load more