질문

How to add headers to an array and output to a text file?

I have an array of numbers of type double. Each row is of length 3xN where N is some fixed number. I want to reshape each row as...

8개월 전 | 답변 수: 1 | 0

질문

How do you plot elements of a cell array?

Given a cell array where each element contains a vector of numbers of type double, I select a few elements to analyze. They are ...

8개월 전 | 답변 수: 1 | 0

질문

Double integral over an anonymous function

I am trying to do the following double integral: where I attempt this by q = 0.01:0.01:50; % range is somew...

9개월 전 | 답변 수: 1 | 0

질문

Doing a nested numerical integral in Matlab

How do I do the following nested integral in Matlab? The goal is to evaluate the following: where the function is defined as...

9개월 전 | 답변 수: 1 | 0

질문

How do you do a sine transform in Matlab?

The sine transform is defined as How do you do a sine transform and its inverse? The functions dst and idst are not recomme...

9개월 전 | 답변 수: 3 | 0

질문

How to determine and adjust the x axis after taking the 1D FFT?

I am trying to take an FFT, but have trouble figuring out the x axis. The time vector is of length N = 100000. The vector has un...

9개월 전 | 답변 수: 2 | 0

질문

Sorting a string according to the values of a vector of type double

I have a vector A with numbers of type double. Two of the values of A are the same, e.g., A = [1.1 2.3 4.4 2.3 5.1]; I als...

10개월 전 | 답변 수: 2 | 0

질문

Finding a value of one vector based on the nonzero values of another vector

Given two vectors, how do you determine the value of A where B is 1? In this case, A=[5 4]. How do I do this? A = [2 5 1 4]; ...

10개월 전 | 답변 수: 3 | 0

질문

Ordering vectors of numbers of type double and strings according to another vector

How do I order the following arrays? vector_1 = [1 3 7 8 9 10]; string_1 = {'apples' 'pears' 'plums' 'oranges' 'peaches' 'gr...

10개월 전 | 답변 수: 2 | 0

질문

Printing special characters in an axis label

How do you print special character(s) using sprintf? I want to use this or similar to add special characters to an axis label as...

10개월 전 | 답변 수: 1 | 0

질문

Modify axis label for each plot within loop

I am generating plots for a series of values using a for loop and wish to output the value in the axis label. How do I do that? ...

10개월 전 | 답변 수: 1 | 0

질문

Working with a cell of strings

I have a large N x 1 array of cells, each cell containing a string. How do I convert this to a string array, or to a cell array ...

10개월 전 | 답변 수: 1 | 0

질문

Rounding a decimal down

With round(x,2) I can round a number to the nearest hundredth, but how do I round down to the nearest hundredth? For example, bo...

10개월 전 | 답변 수: 3 | 0

질문

Padding a cell array?

How do you pad every other element of a cell array with a blank value thereby doubling the length of the cell?

10개월 전 | 답변 수: 1 | 0

질문

Error bars with categorical data type

I am trying to plot error bars in y for data that are categorial type in x. I get an error message saying Error argument 'err...

10개월 전 | 답변 수: 1 | 0

질문

Finding min and max values in a structure

For a 1x1 structure with multiple fields, each field consisting of a cell of numbers, how can you find the minimum and maximum v...

10개월 전 | 답변 수: 3 | 0

질문

Rounding down when doing division in Matlab

How do you round when dividing such that 1/7 = 1 2/7 = 1 ... 7/7 = 1 8/7 = 2 ... 14/7 = 2 15/7 = 3 etc.

10개월 전 | 답변 수: 1 | 0

질문

Differences in power law fit vs. linear fit on log-log scale

I am fitting data using cftool to a power law, i.e. , and comparing it to the 1st-order polynomial fit, i.e. when I take the ba...

10개월 전 | 답변 수: 2 | 0

질문

Analyzing different sections of an array

How do you analyze the first 10 columns of an array (all rows) and columns 11-20, 21-30, and so on, separately?

10개월 전 | 답변 수: 1 | 0

질문

Reshaping a cell array

I have a cell of cells, where each internal cell is a vector of numbers of type double. How can I reshape this in a less cumbers...

10개월 전 | 답변 수: 1 | 0

질문

Replacing part of an array with another

How do I replace the diagonal of one 2d array with the diagonal of another? The arrays have the same size.

11개월 전 | 답변 수: 1 | 0

질문

Duplicating an entire vector

How do you duplicate an entire vector? For example: A=[1 2 3 4]; How do I get the following? 1 2 3 4 1 2 3 4 1 2 3 4 ...

11개월 전 | 답변 수: 2 | 0

질문

Generating the laplacian for a sub-graph that still reflects the connectivity of the overall graph

Generating a sub-graph I think by convention breaks all edges between the sub-graph and the rest of the graph. Is it possible to...

11개월 전 | 답변 수: 1 | 0

질문

How do you remove non-integer values from a colorbar?

My image only has integer values, so including the non-integer values in the colorbar is something I'd like to not do.

대략 1년 전 | 답변 수: 2 | 0

질문

How do you remove tick marks (not labels) from a colorbar?

I have a figure plotted with imagesc and the associated colorbar. How do I remove the tick marks from the colorbar?

대략 1년 전 | 답변 수: 2 | 0

질문

How do I make a red and blue colormap?

I can plot a matrix of integers using imagesc. How do I make a discrete colormap (i.e., only for the integers) with a gradient o...

대략 1년 전 | 답변 수: 1 | 0

질문

Padding a vector with zeros

How do I pad a vector of type double so that there are say 5 elements with zeros after every 3rd element in the original vector?...

대략 1년 전 | 답변 수: 1 | 0

질문

How do I take the average of elements of a vector depending on the values of another vector?

Given two vectors, how do I take the average of values in one vector depending on what the value is in the second vector? For...

대략 1년 전 | 답변 수: 2 | 0

질문

How do I insert one array into another?

I have two arrays with elements of type double. I want to insert the 1st column of array 2 after the 1st column of array 1, the ...

대략 1년 전 | 답변 수: 1 | 0

질문

Cell array to double array?

I have a cell array with each element a vector of type double. How do I convert this to an array of type double?

대략 1년 전 | 답변 수: 1 | 0