Answered
Extracting a 2 dimensional array from a 3 dimensional matrix.
so you have a matrix of 10 rows, 26 columns and 4 deep. That would be a 10x26x4 matrix. to get just all rows for column a for ...

11 years ago | 3

| accepted

Answered
How to plot two different curves on same axes?
Yes you can, read the documentation on plot(). There should be sufficient examples showing how to plot plenty of items on one a...

11 years ago | 0

Answered
convert string to bits and then convert bits back to strings ....
the issue is with your t =reshape(s,length(s)/7,7); it should read t = reshape(s,length(s)/length(word),length(word...

11 years ago | 0

Answered
Is there a clever way to extract piece of x axis of the plot from a script and put it to another plot in another script
well to do it programmatically you can do it through something like this using copyobj(): x1 = [0 1]; y1 = [0 1]; x...

11 years ago | 0

| accepted

Answered
Why does my surface have a 'jagged' look when I do this?
It is due to the spacing of your points. the data is being graphed in a grid so you're not going to have a nice straight line c...

11 years ago | 0

Answered
NxN Matrix with sinusoidal element values
well you'd just plot row 1 like you would a sinusoid. x = [1:100]; y = sin(2*pi*x/6); then repeat row 1 to make it NxN ...

11 years ago | 2

Answered
Creating random order of trials (numbers in a matrix) with restrictions
Well initial thoughts are to generate the initial matrix using for ind = 1:5 A(ind,:)=mod(randperm(49,49),10)+1; ...

11 years ago | 1

Answered
How do I use a switch statement to convert units?
Well you probably wouldn't want to use a switch statement to display a menu. You'd probably use something like a questdlg(), in...

11 years ago | 0

| accepted

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

11 years ago

Answered
Please Help! How can I fill the 1x10 array with random integers but that the all integers would be different from each other?
that can be easily done with randperm(N,10) where N is the max number to be random.

11 years ago | 2

| accepted

Answered
How to determine the number of white lines in a BW image/vector
Well you'd start off by detecting the transition from 0 to 1 or 1 to 0. you this can be done by vect = [0 0 0 1 1 1 0 0 0...

11 years ago | 0

| accepted

Answered
how to use varibles in a static text gui
you handle it just like an edit box by setting the handle parameter 'string' to a string. so converting the variable from a dou...

11 years ago | 0

Answered
fzero for f(x,y) where y is a m*m matrix
you've got already. but all you need is one extra line to reshape f3 to be [row col]=size(y); reshape(ansfromarrayfun,...

11 years ago | 0

| accepted

Answered
How can choose two point from signal and keep any data between them ?
So if i understand your question correctly what you're looking for is the <http://www.mathworks.com/help/matlab/ref/colon.html c...

11 years ago | 0

| accepted

Answered
How can I loop each line of a script as the conditional in a new if statement?
Well.... I too am not entirely sure what you're trying to accomplish but if the formatting of your conditional script is always ...

11 years ago | 0

Answered
I want some variables to appear in the (edit text box) in the gui along with some string info.
you can use the function num2str() to convert the double to a string. x = 1 y = 2 outputstring = ['the winnin...

11 years ago | 0

Answered
How to write a function to scramble letters?
You can use the function randperm() to generate a random permutation of the indexes. so then you would use the random permutati...

11 years ago | 1

Answered
[uitable] Insert a table as a subplot
I'm not entirely sure what you are describing as the ideal solution. Are you asking for a click and drag ability to dynamically...

11 years ago | 1

| accepted

Answered
Scatter plot - plot different symbols when data is negative
well what you're missing is any indexing inside your while loop to check which are less than 0 and basically comparing all of si...

11 years ago | 0

| accepted

Answered
How do I generate distances between a varying object within a grid and 5 fixed locations.
so you can create x and y pairs using meshgrid() Gx = [50:50:500]; Gy = [50:50:400]; [Gx Gy] = meshgrid(Gx,Gy...

11 years ago | 0

| accepted

Answered
How do I update an image in gui using selections?
I see you've already know about the get(handles.(tag),'value') to get the state of the checkbox(s) so the question is in whateve...

11 years ago | 0

Answered
how i subtract a vector( 1*n-dim ) from columns of a matrix (n*n-dim) without uses for , end and orders likes these?
Look at the function repmat() to tile the vector to perform the matrix subtraction.

11 years ago | 0

Answered
Running a code with preset values or asking for values
You can use the two functions questdlg() and inputdlg() to ask the questions and for them to input the values. The examples in ...

11 years ago | 0

| accepted

Answered
How To Find Distance Between Centroids ????
So you already have two centroids with coordinates (x1,y1) and (x2,y2) then the distance formula would work right? distance...

11 years ago | 1

Answered
A GUI that takes in input and solves a set of ODEs
One of the best ways to get started to learning GUIDE is to look at the basic examples that they have. When you just type in "g...

11 years ago | 0

| accepted

Answered
How to make the legend selective?
So... the problem i see is that the characteristics of the markers are linked directly to the style of the plotted points. So fa...

11 years ago | 0

| accepted

Answered
Adding full figure edit options to an executable?
I think something like this would work where lets just say hfig is your figure for plot. hfig=figure; %or however you get y...

11 years ago | 0

Answered
How to swap columns of matrix zeros(2,n)
well you can achieve this by test = randi(10,2,10) hfliptest = test(:,end:-1:1) i cant remember if there is a bu...

11 years ago | 1

Answered
Matlab : 2 x-axis with one plot
well to expand on what pfb says you can try something like this x1 = 1:50; x2 = 1:10; y1 = (1:50)-25; y2 =...

11 years ago | 0

Answered
Plot circle through 3 points
You'll find the center point of the circle by finding the intersection of two lines. Start off by calculating the line equati...

11 years ago | 0

Load more