Réponse apportée
Median gray level value
Hi Faraz, you can simply make a mask of the pixels you *don't* want to include, then take the median of all the others: Im = ...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Changing the font displayed in a waitbar
It's hidden a little bit: h = waitbar; titleHandle = get(findobj(h,'Type','axes'),'Title'); set(titleHandle,'FontSi...

plus de 14 ans il y a | 0

Réponse apportée
Comparing between Array Elements
If you were running the code you put in the question, you should have gotten an error (rather than an absurd answer). There was ...

plus de 14 ans il y a | 1

Réponse apportée
working with two variables
It's not the most efficient code, but I've kept things similar to your original input for clarity. Think now of "MF" as a grid o...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Specifying 3D points with the mouse
In short, don't use *ginput()*, use *get(ax,'CurrentPoint')* instead. Basically the current position of the mouse, combined w...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Re-scaling matrix entries to lie within a range
You can use the "mod" command with modulus 2*pi, then minus pi from the result. For example: mod(4.5*pi + pi, 2*pi) - pi ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
How to extract cell array in matlab
If you have strings of dates, use datevec as follows: [Y, M, D, H, MN, S] = datevec('22.11.2011 13:58:56.16'); You'll noti...

plus de 14 ans il y a | 1

Réponse apportée
How to generate a 3d Spline curve can interp3 be of help
Hi Anjani, I think this is what you want to do: Get your original data: d=[0.007773 0.649806 0.627914, 0.007773 0.652142 0...

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
Iteration in Matlab
Your "break" command only breaks out of one loop. Instead try: exitLoop = false; C_pd = Specific_Heat(T_d,X_d); ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Interpolating Data from Vectors of Different Length
This is a job for the *interp1* function: % Make original data oldPcntVals = [0 .1 .3 .7 .9 1]; oldYvals = [10 12 15 13 ...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Reversing Columns in a Matrix
Use *fliplr* to flip a matrix left-to-right: a = [1 2 3 4 5 6] b = [a(1) fliplr(a(2:5)) a(6)] See also: *flipud* (fli...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
prolem in sparse
Huda, try this (edited to update with comments): % Make Data x=sparse(10,10); x(1:10,1:10)=5; % Get the rows, cols, ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Variable for range in xlswrite
Providing a variable as a string should be exactly the same as providing that string directly. Here are 3 possibilities that I c...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
The problem with the function 'all'
I think you want to compare a(1,:) to b, and a(2,:) to b. So try this using bsxfun: all(bsxfun(@gt, a, b),2) Does that give ...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
What is your MATLAB uptime
I've got 2 machines with MATLAB always open :) PC1. The desktop - hack around developing and testing. PC2. The runner - An...

plus de 14 ans il y a | 0

Réponse apportée
plot different color
Steven, try this, it plots two separate plots depending on whether y is above/below 0.5: x = 0:pi/20:10*pi; y = sin(x); mas...

plus de 14 ans il y a | 1

Réponse apportée
how to format rows columns for display
Hi FIR, Make data: D = [(1:800)' randi(4,800,1) rand(800,1)+99]; Display all data rounded: disp(round(D)) D...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
function
Baba, variables created *inside* a function are _limited_ to that function's scope. If you want to have DATA available outside t...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
error in selecting data
Hi FIR, The error comes because the ismember() function expects *either* a matrix of numbers *or* a cell array of strings. Sinc...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
How to count changes in binary transmission through channel
Hmmm... does this answer your question, Will? originalBits = rand(1,100000)>0.5; returnedBits = transmitSignal(originalBits...

plus de 14 ans il y a | 0

Réponse apportée
Binary Number Transmitter
The "if" statement is only executed once, however you have 100000 elements. Essentially, if *any* elements in a vector are false...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
question about structures in Matlab
Yes, that's possible: s = struct('field1', 45, 'field2', 'Nothing') s.field3 = struct('subfield1', 232) And you can acc...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
sorting 3d matrix by value of a cell
Hi Markus, If you have a 3D *MATRIX* of numbers, and the distance you want to sort by is stored, say, in the (1,1) location of ...

plus de 14 ans il y a | 1

Réponse apportée
basics - a more compact way to do this...?
The simplest method is: k = size(x, 2) The second argument of the "size" method is the dimension in which to query - in your...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Help needed in debugging the code for Identifying round objects ..
This is a pretty good attempt, and I think the code below does what you intended. The one biggest change is that instead of try...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Creating matrix from a for loop
Hi athpapa, I don't know what your "A" matrix or "symbols" matrix had, so I will just make them random numbers: A = randi(50...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
How to specifically select columns in a data matrix?
Try: xdatatemp = xdata(:,[77:83 86]) And you can even use "end" keywords such as: xdatatemp = xdata(:,[77:83 86 end end:...

plus de 14 ans il y a | 41

| A accepté

Réponse apportée
concatenating / manipulating matrix based on user input
Hi Karan, try this: The setup: matrix_dates = [ 1 1701 1 1702 4955 2 ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
combination
Mohammad, try this for a solution. It is a loop that iterates along the columns of x, picking the next available x(row,col). Whe...

plus de 14 ans il y a | 0

Réponse apportée
Extracting Cracks
Hi Ratna, It's quite difficult due to the relative intensities - cracks are only a "little" bit lighter than solid material. Her...

plus de 14 ans il y a | 1

| A accepté

Charger plus