已回答
Is it possible to connect points on a scatter plot with arrows instead of a line?
x = rand(10,1); y = rand(10,1); dx = diff(x); dy = diff(y) plot(x,...

7 years 前 | 0

已回答
How do I plot piecewise defined functions in different colours.
myFun = @(x) ((x<=100).*(0.5 .* x)) + ((x>100 & x<=200) .* (50+0.2.*(x-1000))) + ((x>200).*(75+(0.5.* x))); fplot(myFun,...

7 years 前 | 0

已回答
How I can change the legend of a graph from vertical to horizontal
plot(rand(10,3)); legend({'a','b','c'},'Orientation','horizontal'); Please read the <https://se.mathworks.com/help/matlab/...

7 years 前 | 4

| 已接受

已回答
Help, How can I write the symbol " theta" in Matlab
aH = axes; plot(rand(10,1)); aH.XLabel.Interpreter = 'Latex'; aH.XLabel.String = '$\theta$';

7 years 前 | 2

已回答
How remove NaN values in all Matrices in Cell
This will get rid of the entire row if there is a NaN: c{1}= [1 1 1; 2 2 2; 3 3 3; ...

7 years 前 | 1

| 已接受

已回答
How to plot histograms of two different classes in a single plot?
histogram(rand(100,1)); hold on histogram(rand(100,1)-2,'FaceColor','r');

7 years 前 | 0

| 已接受

已回答
I want to copy some data
a = [2 3 4; 6 2 3; 9 8 3]; idx = ndgrid(1:3,1:4)'; result = a(idx(:),:) *Edit:* Felt the nagging need for a one-liner...

7 years 前 | 0

已回答
Obtaining the chi square value from a multigaussian fit
Provided you have the right toolbox: <https://se.mathworks.com/help/stats/chi2gof.html> Otherwise, use the residuals of yo...

7 years 前 | 0

已回答
Error reading .mrc file
ReadMRC('sample.mrc')

7 years 前 | 0

| 已接受

已回答
how to convert text to speech
<https://se.mathworks.com/matlabcentral/fileexchange/18091-text-to-speech> <https://se.mathworks.com/matlabcentral/answers/32...

7 years 前 | 0

已回答
Get CPU and memory usage
<https://stackoverflow.com/questions/25950727/show-cpu-cores-utilization-in-matlab>

7 years 前 | 1

| 已接受

已回答
How can change transparency and thickness of a line in Matlab
Provided you have a reasonably recent version of Matlab: p1 = plot(rand(10,1),'r-','LineWidth',5); hold on p2 = plot(rand(...

7 years 前 | 14

| 已接受

已回答
How can I concatenate two string vectors 5x1 and 1x18 to get a 5x18 text matrix
Currencies = {'ARS','BRL','CLP','COP','CZK'}; % et cetera Criteria = {'TR';'YC';'SPR';'SS'}; result = cellfun(@(x,y) [x,...

7 years 前 | 0

| 已接受

已回答
plot3 temperature color
Looks like you are looking for <https://se.mathworks.com/help/matlab/ref/scatter3.html _scatter3()_>.

7 years 前 | 0

已回答
Randomizing the rows of a matrix and reversing
If you want to return to the original matrix, you need to keep it. There is no way to _undo_ a random permutation, unless your d...

7 years 前 | 0

| 已接受

已回答
Sparse matrix in optimization
Looping is one way to go. i = [900 1000]; j = [900 1000]; v = [10 100]; S = sparse(i,j,v,1500,1500) for ii = [i;j] ...

7 years 前 | 0

已回答
Populate columns of matrix without for loop using input from a vector of intergers
X=[0, 2, 1, 2, 3]; numCols = max(X) + 1; result = zeros(numel(X),numCols); idx = sub2ind(size(result),1:numel(X)...

7 years 前 | 0

| 已接受

已回答
Why do i get error 'No supported compiler or SDK was found' when i use mex -setup?
Are you sure it's <https://se.mathworks.com/support/compilers.html supported>? Down to the version number.

7 years 前 | 0

已回答
How to compare some specific entries of a matrix, if I have their indices stored in 2 files?
idx = sub2ind(size(C), A, B) result = max(C(idx));

7 years 前 | 0

| 已接受

已回答
Extract group of identical values from an array
If you have the image-processing toolbox. <https://se.mathworks.com/help/images/ref/bwconncomp.html#outputarg_CC bwconncomp()...

7 years 前 | 0

| 已接受

已回答
how to plot scatterplot for one attribute?
data = rand(10,1); figure plot(data); %implicit figure plot(1:size(data,1), data); %explicit Please read the docum...

7 years 前 | 0

已回答
How to find all Linux command
Not sure if all, but you can always use the <https://se.mathworks.com/help/matlab/ref/unix.html _unix()_> function.

7 years 前 | 0

已回答
To put score value based on neighbor column position value in same row
idx = cellfun(@(x) ~isempty(x), funct(:,1:2:end); fillMat = repmat([0:-1:-(size(funct,1)+1)]',1,numel(1:2:size(funct,2))) .* ...

7 years 前 | 1

已回答
how to reverse cell elements from left to right
cellfun(@(x) {fliplr(x)},a)

7 years 前 | 0

| 已接受

已回答
Find the precision of a value
Just in case your number is stored as a string: bla = '5.14'; result = strsplit(bla,'.'); result = numel(result{2}) T...

7 years 前 | 1

已回答
How to plot partial results of a for-loop in one figure and create different figures for other results?
<https://se.mathworks.com/help/matlab/ref/subplot.html subplot()>

7 years 前 | 1

| 已接受

已回答
How do I quiver plot magnetic field
You could use <https://se.mathworks.com/help/matlab/ref/quiver3.html quiver3()>.

7 years 前 | 0

已回答
How to get all possible combinations of data in a cell?
data = {{'A', 'B', 'C', 'D'}; ... {'E','F',};... {1, 2, 3, 4};... {5, 6, 7}}; cell_size = cellfun(@(x) size(x,...

8 years 前 | 1

已回答
How can i measure the distance between points in a scatter graph
<https://se.mathworks.com/help/stats/pdist.html pdist()> with the _'cityblock'_ argument should do the trick.

8 years 前 | 0

已回答
How to plot a surface in its parametric form ?
You don't need to use _meshgrid()_ if you have the _symbolic math_ toolbox. <https://se.mathworks.com/help/symbolic/mupad_ref...

8 years 前 | 0

加载更多