Question


Calculation of conditional expectations
Suppose I have a vector A and I would like to calculate the sum of the elements in A divided by the number of positive elements ...

8 years ago | 1 answer | 0

1

answer

Question


Creating a matrix of marginal distributions from a matrix of joint distributions
I would like to create a matrix of marginal distributions from a matrix of joint distributions. As a specific example, suppos...

8 years ago | 1 answer | 0

1

answer

Question


Editor and command windows next to each other, Part 3
Now I have two windows side by side. What will be the steps to make this setting to be a default setting (i.e. whenever one open...

8 years ago | 1 answer | 0

1

answer

Question


matrix when logging with "diary" command
When I save an output using "diary" command, I get an output that there are line breaks for each two columns. But I would like t...

8 years ago | 0 answers | 0

0

answers

Question


Diary file with current date and time as time stamp, Part 2
To follow up with "Diary file with current date and time as time stamp," % Turn On Diary Logging diary off % first t...

8 years ago | 1 answer | 0

1

answer

Question


Save workspace output to a file, part 2
Suppose I have a code as follows a=1; fprintf('value of a is %f \n',a) b=2; fprintf('value of b is %f \n',...

8 years ago | 0 answers | 0

0

answers

Question


Save workspace output to a file
I run a program and output various results to a workspace. Is there anyway to put all the outputs in a workspace into a single f...

8 years ago | 2 answers | 0

2

answers

Question


Editor and command windows next to each other, Part 2
Now I have two windows side by side. But the comments are not wrapped. I tried "editor/debugger->language->wrap comments automat...

8 years ago | 1 answer | 0

1

answer

Question


Editor and command windows next to each other
I would like to have an editor and a command window next to each other (not that the editor is above the command window). Please...

8 years ago | 0 answers | 0

0

answers

Question


Difference between a table and a matrix
What is a difference between a "table" and a matrix? One can use save command to write a matrix data to a file. Can one use t...

8 years ago | 1 answer | 1

1

answer

Question


Importing spreadsheet interactively: what to do about the first row of names
I import a spreadsheet interactively with import menu. The first row has variable names. How to keep these variables names in th...

8 years ago | 1 answer | 0

1

answer

Question


Merging a dataset with entries for every day with the other one with entries only for weekdays
I have two datasets. The first one has data for every day. The second one has entries and data only for weekdays. How can I merg...

8 years ago | 1 answer | 0

1

answer

Question


Two surfaces plot hard to distinguish
I have two surface plots in a single plot. These surface plots are hard to distinguish. 1. How can I change colors of each s...

8 years ago | 1 answer | 0

1

answer

Question


Defining a projection function
I have defined a function of three variables function a = test(A,B,C) a = A.*power(B,0.3).*power(C,0.7); end N...

8 years ago | 2 answers | 0

2

answers

Question


Partial derivatives of the inline function
I have defined an inline function in a script function a = Test(A,B,C) I want to symbolically define partial derivatives...

8 years ago | 2 answers | 0

2

answers

Question


Change the exponential notation of numbers to demical notation of numbers
I see that numbers are displayed in exponential notations such as 7.245E+3; I would like to have them in demical notatio...

8 years ago | 1 answer | 0

1

answer

Question


Saving the plot: how to set the size of the saved plot
When I save the plot, the default will be that the plot will be saved in a square. But I would like to save the plot in a differ...

8 years ago | 1 answer | 0

1

answer

Question


Divide all the elements of the column by the first entry
Suppose I have a column vector X=[2; 3; 4; 5]; I want to divide all elements of the vector by the first entry so that th...

8 years ago | 2 answers | 0

2

answers

Question


Display variables in the Workspace from script
Suppose I have a variable x=1; I want to have a script that displays this variable in the workspace (see attached.) Plea...

8 years ago | 1 answer | 0

1

answer

Question


How to clear all displayed variables
I click some variables in Workspace to get information about these variables (see attached). I would like to clear displays of a...

8 years ago | 1 answer | 0

1

answer

Question


A breakpoint immediately after the execution of the code
Suppose I have a code i=1; I would like to have a breakpoint that stops the execution *immediately after* this line is ...

8 years ago | 2 answers | 0

2

answers

Question


Saving breakpoints in a script
Suppose I put breakpoints in a script. I want to save these breakpoints so that I can reuuse them in a next session. I have ...

8 years ago | 1 answer | 0

1

answer

Question


loop over struct element
Suppose I create a struct data.ID0 data.ID1 Suppose I want to have a loop i that first work with data.IDO and then with...

8 years ago | 1 answer | 0

1

answer

Question


Difference between {} and []
What is the difference between A = {0,1,2} and A = [0,1,2] ?

8 years ago | 2 answers | 0

2

answers

Question


A function that takes a string and returns the output file name, Part 2
Previously I asked, "I want to have a function that takes a string S that defines the file name to be saved. For example, if...

8 years ago | 1 answer | 0

1

answer

Question


A function that takes a string and returns the output file name
I want to have a function that takes a string S that defines the file name to be saved. For example, if S = 'Chicago' then it wi...

8 years ago | 1 answer | 0

1

answer

Question


Extracting columns from a matrix
I have a matrix A with 6 columns. I have an index S with *S=0 means extracting 3rd-6th columns from A *S=1 means extract...

8 years ago | 1 answer | 0

1

answer

Question


Obtain information on a matrix
Suppose I have a matrix A and want to display information on A such as # of rows and # of columns. The average value of entries,...

8 years ago | 1 answer | 0

1

answer

Question


Installing a file from fileexchange
I would like to use files such as <https://www.mathworks.com/matlabcentral/fileexchange/29305-descriptive-statistics> Ple...

8 years ago | 1 answer | 0

1

answer

Question


Display parameters in a different window
Suppose I have set a parameter a=2; b=1; I want to display these information on a different window (like a plot window)...

8 years ago | 1 answer | 0

1

answer

Load more