Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

12 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

12 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

12 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

12 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

12 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

12 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

12 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

12 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

12 years ago

Answered
How to create a timer object to replace pause function?
see my example for using/starting timer. In the linked question the question was how to change the colour of the button in a de...

12 years ago | 0

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

12 years ago

Answered
How can I have a GUI that is like a telephone keypad where the numbers pressed are stored in a static text box, there is a clear key, and a backspace key to manipulate the text box?
without diving into your code too much and next time warn us that the computer will beep. Wasn't prepared for that. Anyways, t...

12 years ago | 0

Answered
Find max and min of groups in columns of a matrix
Why not break it up into the groups and handle them in a for loop? you can search for groups with groupstart = find(a(:,1)==0...

12 years ago | 0

Answered
Exchanging data from data acquisition listener to GUI
When you try to store the data in handles did you update the handles object with: guidata(hObject, handles);

12 years ago | 0

Answered
Randomly Appearing Zeros in Data Output
I am suspecting that it is coming from your rownum = ronum+numbers. From your snippit rownum starts at 1 and then gets increm...

12 years ago | 0

| accepted

Answered
how to define random values of slider?
This will be a 2 part solution. To answer your only get 1 you'll need to do something like this. Button1 = uicontrol('St...

12 years ago | 0

| accepted

Answered
how to get text file of an image?
you can try num2str() but your question it kind of vague.

12 years ago | 0

Answered
I had a matrix s of size 4*12540, i want to use only 4*4 of this matrix how should i remove extra columns?
If you want to completely remove these columns you can use [] ; example: Testmatrix = rand(4,12540); Testmatrix(:,5:e...

12 years ago | 1

Answered
how to retrive the text file? nd which function is needed for retrive the text file?
Depending on what you are looking to do however each method will use fopen(). If you are looking for the text within the fi...

12 years ago | 0

Answered
How to plot this graph?
You'll have to add to this more to get it to look pretty or to fit your data. However code below shows examples of what you're ...

12 years ago | 0

| accepted

Answered
Printing final result after iteration
put the ; at the end of your HFINAL(i,j)=HOLD(i,j); then after the for RepeatNumber =1:3 loop is finished do disp('...

12 years ago | 0

| accepted

Answered
.mat file w/ vertices of 3D image inputted into axes in GUI
From your screenshot you will not be able to do it there. Are you trying to plot this when it opens? Push of a button? Where...

12 years ago | 0

Answered
str2double / str2num / conversion confusion
reason is that you are doing str2double 2x. so area already has the text being converted to a double. then you try to convert ...

12 years ago | 0

| accepted

Answered
How to display an existing ROI on an image (Copy an ROI to another image)
with the h = imellipse; you can get the points by doing vert = getVertices(h) figure(2),imshow(i2),hold on; plot(v...

12 years ago | 0

| accepted

Answered
using predefined string for savefig
What you have should work. The only thing that could get in the way is if you have a user-defined function that is also called ...

12 years ago | 0

Answered
divide an image region into 4x4 blocks
You can try to use blockproc(A,[4 4],fun) where fun is a function which does mean(mean(block_struct.data))

12 years ago | 0

| accepted

Answered
How can I plot multiple squares?
<</matlabcentral/answers/uploaded_files/10487/squareINcircle.jpg>> something like this? I won't supply this code but you...

12 years ago | 1

| accepted

Answered
How do I determine if a value is unique within an iteration?
You can use length(find(nuc(1,i)==nuc))>1 to see if it is not unique. Since you already have defined nuc(1,i) within nuc then o...

12 years ago | 0

| accepted

Answered
How do I divide image into overlapping blocks size
If blockproc is not working out due to 8, why not use a a nested for loop to carve out the 15x15 block? [row col]=size(Imag...

12 years ago | 0

| accepted

Answered
creating upper and lower thresholds when graphing?
after you plot the original data hold on, plot(x,y,'r--'); where x = [Xaxisstart Xaxisend] and y=[yaxisThresholdvalue...

12 years ago | 0

| accepted

Load more