Answered
matrix operation make matrix
A = reshape(repmat((1:8), 8, 1), 1, []) b = repmat(1:8, 1, 8)

11 years ago | 0

Answered
how can i find out the minimum (x1,y1) and maximum (x2,y2) cordinates of any image in matlab in the form of minimum boundary ractangle ?
First, you will need to threshold the desired region of your image (i.e. the portion for which you want to find the boundary rec...

11 years ago | 0

| accepted

Answered
finding maximum abs value of four images
No loops necessary: CombinedImages = cat(3, I1, I2, I3, I4) I5 = max(abs(CombinedImages),[],3)

11 years ago | 1

| accepted

Answered
does an "if does not contain operator" exist
The "if does not contain" operation can be done with ismember, using something like: notPi = ~ismember( user_input, pi) ...

11 years ago | 0

Answered
Syntax to comment/uncomment line(s) of code in a Matlab script
There is no way (at least as far as I am aware) to comment out lines programatically. However, even if you could, this is almost...

11 years ago | 0

| accepted

Answered
Problem with if statments
The error is because you are comparing a vector of (presumably) 1000 elements to another vector of 1000 elements. Thus, when you...

11 years ago | 1

Answered
How do I take the average of a zeros vector without dividing by the unpopulated zeros?
So basically you just want to exclude zeros from your mean? notZero = (handles.vxdata)~=0; handles.speedavg = mean(handl...

11 years ago | 0

| accepted

Answered
Coincidence detector in Matlab
How about something like this? (I assume all signals are sampled synchronously). edges1 = find(diff(Signal1) > 0); %get ri...

11 years ago | 0

| accepted

Answered
How to use the If function to find and replace symbols in an equation?
I think you want to use subs() to set the zero terms: a=subs(a, {'A1_' ,'A2_', 'A3_'}, {0,0,0}); You wouldn't be able to...

11 years ago | 0

Answered
How to delete a ROI after having drawn a new one
Probably the most robust way is to save the handles to imrect/impoly and then delete just that object. Something like this: ...

11 years ago | 0

| accepted

Answered
quick question about string read
Use the functional form of load, i.e. load(a1);

11 years ago | 0

Answered
Evaluating incomplete elliptic integrals in MATLAB
I've used this set of functions in the past to evaluate incomplete elliptic integrals: <http://www.mathworks.com/matlabcentra...

11 years ago | 0

| accepted

Answered
Wanted features for UITABLE and UITREE
It would be nice to be able to update the contents of a single uitable cell without "flicker". As it stands now, it is easy to m...

11 years ago | 7

| accepted

Answered
Why am I getting a matrix when [I think] I should be getting a vector?
It's because in your second calling of the function [maxV, minV] = myFunction(volume, bins) you are setting the first o...

11 years ago | 1

| accepted

Answered
License Plate Recognition - need help to improve code.. :)
Hi Michal, You might have more luck thresholding the three color planes (red, green, and blue) separately, rather than thresh...

11 years ago | 0

Answered
Find moving average with filter
Or even easier, go to the "Help" in Matlab, and search "moving average filter". The first or second link (the one entitled "Exam...

11 years ago | 1

Answered
How to save MAtlab output in a file that you can reopen later?
Save your workspace as a *.mat file is easiest. You can use File->Save Workspace As from the menu or using the 'save' command. ...

11 years ago | 1

| accepted

Answered
Selecting text from a .txt file
Hi Drew, First, you just need to import the data from the file into Matlab. Easy enough: data = dlmread('/path/to/your...

11 years ago | 0

Answered
Need help to save data from getkey into the file by using fprint
Hi Maliheh, Based on what you have specified above, I think this will work: %note that you will need to define the parti...

11 years ago | 0

Answered
How to display minimum vaue of a Surface z-axis.
You can do this using text() function. Something like this: %Xval, Yval, and Zval are your MxN matrices used to make the su...

11 years ago | 0

Answered
problem with reading MRI image (dicom)
Hi D C, It's probably just a display issue. When using imshow, try setting the DisplayRange to autoscale, i.e. imshow(...

11 years ago | 0

| accepted

Answered
can i do this program in matlab
Hi joy, Your question is a bit unclear. It sounds like you are trying to do two different things: 1) You want to write a new...

11 years ago | 0

| accepted

Answered
Hello, I am trying to fit some data points with an exponential equation.
Hi Krish, There are a couple of different ways to do this. Do you have the Optimization Toolbox or Curve Fitting Toolbox? If ...

11 years ago | 1

Answered
Questions Regarding Matlab & Txt Files
To read the text file into a variable: txt = fileread('/path/to/text/file.txt') To get the number of 'b''s in a file. ...

11 years ago | 0

Answered
How to perfrorm this task using for loop and find function?
Since this is homework, we won't provide the code, but have you looked at the help for these two functions? At the Matlab prompt...

11 years ago | 0

Answered
what is PAR on MATLAB?
First, par and Y here appear to be previously-defined Matlab variables, not built-in functions. It looks like the outputs fro...

11 years ago | 0

Answered
Putting random values in for loop
Hi Sazzad, First of all, you don't need the loop: you can just do it like this: vv = floor(+1*120*sin(2*pi*(t-1)/40)); ...

11 years ago | 1

Answered
Help with looping problem
I'm not entirely clear what you want, but I think this will do the trick: x = (0:0.1:pi)'; rx = [x, x]; ry = [ repmat...

11 years ago | 0

Answered
Outputing a high and low value based on a negative or positive signal
Hi Joseph, You could use a switch block ( <http://www.mathworks.com/help/simulink/slref/switch.html>) where the second input...

11 years ago | 0

Load more