Question

place matrix in array part 2

This post is building from the post found <http://www.mathworks.com/matlabcentral/answers/307465-place-array-in-a-matrix here.> ...

bijna 7 jaar ago | 1 answer | 0

Question

place array in a matrix

Hello, I have these points: x1 = (1,0), x2 = (0.5,1), x3 = (0.5,1.5), x4 = (0, -1), x5 = (-1,1), x6 = (0.5, -1) How do I g...

bijna 7 jaar ago | 1 answer | 0

Question

plot graph from array

Hello, I have this array: Class1 = [1 0; 0.5 1; 0.5 1.5]; How do I go about plotting the 3 points from Class1? If I use...

bijna 7 jaar ago | 1 answer | 0

Question

Restructure matrix to get back original matrix

Hello, In the code below, I generate a random 8 x 5 matrix then create a new matrix 'temp' that is A restructured to `temp = res...

meer dan 7 jaar ago | 1 answer | 0

Question

Check error rate from Principal Component Analysis

Hello, For the Matlab code given to find the <http://www.mathworks.com/matlabcentral/fileexchange/45750-face-recognition-using-...

meer dan 7 jaar ago | 0 answers | 0

Question

Close prompt dialog box after hitting OK

Hello, In the function below, I wanted to be able to close the prompt window after hitting the OK button. However, with th...

meer dan 7 jaar ago | 1 answer | 0

Question

Wait for user input after pressing button

Hello, I created a "OK" button using the guide template in Matlab. Here is the code: function varargout = prompt11(vara...

meer dan 7 jaar ago | 1 answer | 0

Question

Set up graph before going into for loop, then refresh data in plot after each iteration

In this program, I wanted to know if it is possible to update just the data points during the for loop, but keep the graph setup...

meer dan 7 jaar ago | 1 answer | 0

Question

Get value from function to be used in program

Hello, I wrote a simple function program called ADD: function A = ADD(N,M); A = N + M return and this is th...

meer dan 7 jaar ago | 1 answer | 0

Question

Problem getting array after multiplication/division

Hello, in the code below, I wanted to get an array for "Hp" for all the values of "f". I am only getting 1 value for "Hp". Ca...

meer dan 7 jaar ago | 1 answer | 0

Question

Write matrix to text file

Hello, I am trying to write a matrix 'A' to a text file. I would like the data written to file like this: A = ...

meer dan 7 jaar ago | 1 answer | 0

Question

Extrapolate data after shifting plot

Hello, In the code provided, I have shifted plot 1 in the positive x-direction, but in doing so, I have no data now from x=1 ...

meer dan 7 jaar ago | 1 answer | 0

Question

Shift data in the negative x direction then multiply shifted data with other plot

Hello, I have two plots from a simulated loop. I wanted to shift the data in plot 2 in the negative x direction, then multip...

meer dan 7 jaar ago | 1 answer | 0

Question

Help to make code into a for loop

Hello, I would like to know how to go about making the following code into a for loop: A1 = [0 1 0; 0 0 0; 0 0 1] %fp...

meer dan 7 jaar ago | 1 answer | 0

Question

Change just the ylims of the Magnitude plot from the bode TF

Hello, I am trying to change the ylims of just the magnitude of the bode TF plot but I get the error "Undefined function 'get...

meer dan 7 jaar ago | 2 answers | 0

Question

Add header to data file

Hello, In my code below, I wanted to know how to go about adding a header to the file. The header will be the column names: ...

meer dan 7 jaar ago | 1 answer | 0

Question

Save Cell data to file

Hello, In the code below, how do I go about saving the cell data to a csv file with the specified headers? Here is my code...

bijna 8 jaar ago | 2 answers | 0

Question

Save different size cells to text file

This post is building from previous posts and I have been modifying the code as I go along. I am still having a problem saving ...

bijna 8 jaar ago | 1 answer | 0

Question

Problem saving cell to txt file

Hello, I am trying to save different size arrays to a text file. Can you help me save my arrays to the text file? Here is my ...

bijna 8 jaar ago | 1 answer | 0

Question

Save data to file with different array size

Hello, I wanted to save a data file that contains different array sizes. Can you assist me with this task? This is the code th...

bijna 8 jaar ago | 1 answer | 0

Question

One common Y-axis label for two or more plots

Hello, How can I get just one Y-Axis Label to span two or more plots? That is, center the Y-axis label between the plots in ...

bijna 8 jaar ago | 1 answer | 0

Question

Add gaussian distributed noise with mean and variance to matrix

Hello, I've seen that to add gaussian distributed noise to a matrix A with mean 0 and var = 5, this is the code A_wnoise...

bijna 8 jaar ago | 2 answers | 0

Question

Save data to file

Hello, In my code below, I am having a problem saving the matrix A properly to a file. The saved data is getting mixed up an...

bijna 8 jaar ago | 1 answer | 0

Question

change appearence of 3rd plot in plotyy and plot legend

Hello, I am trying to have 3 different plots show in the same graph. I have one plot associated with the left y-axis and 2 pl...

bijna 8 jaar ago | 1 answer | 0

Question

Change color style of plot

Hello, I was attempting to change the color of one of the plots in my graph to a specific color but I could not get the progr...

bijna 8 jaar ago | 1 answer | 0

Question

Can you tell me why my x-axis grid in plot (b) shows incorrectly?

Hello, In my MWE below, I am plotting 4 graphs. I am trying to get graph (c) and (d) to show up with the x-axis as floating ...

bijna 8 jaar ago | 1 answer | 0

Question

Plot two graphs in the same figure, that have different number of points from text file

Hello, I am trying to plot 2 graphs in the same figure, but I am having a problem as the two datasets contain different numbe...

bijna 8 jaar ago | 2 answers | 0

Question

Change x-axis grid lines

Hello, In my MWE below, I wanted to know how to add minor grid lines of 0.001 to the x-axis? Here is my code: % Selec...

bijna 8 jaar ago | 1 answer | 0

Question

color plot above and below y-axis points

From my simulation file below, I wanted to color the plot in red for sections of the graph that goes above 100, and below -100. ...

bijna 8 jaar ago | 1 answer | 0

Question

Run for loop and print data after each iteration

Hello, in my attached Matlab Code, I would like to run the for loop to carry out the calculation on each of the DataX and then p...

bijna 8 jaar ago | 1 answer | 0