Réponse apportée
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 ...

environ 11 ans il y a | 3

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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 ...

environ 11 ans il y a | 2

Réponse apportée
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; ...

environ 11 ans il y a | 1

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

A résolu


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

environ 11 ans il y a

Réponse apportée
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.

environ 11 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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,...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 1

Réponse apportée
[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...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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.

environ 11 ans il y a | 0

Réponse apportée
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 ...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 1

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 1

Réponse apportée
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 =...

environ 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Charger plus