Answered
My matlab gets an error when trying to plot anything
Did the contents of the file change? Compare it with your backup or the "Recent Versions". Try to re-install this file or the co...

9 years ago | 0

Answered
Make faces of cube transparent
patch('Vertices',vert,'Faces',fac,... 'FaceVertexCData',hsv(6),'FaceColor','flat', ... 'FaceAlpha', 0.5); ...

9 years ago | 1

| accepted

Answered
Find value in cell array and return index
What have you tried so far? How do you want to store the results? The solution is more or less trivial with a loop: A = ...

9 years ago | 3

| accepted

Answered
Index exceeds matrix dimensions. Error in fcmclust (line 40) plot([toda(:,x) collosal(:,x) illexblck(:,x) backlightblck(:,x) loligoblck(:,x)],...
The readers cannot reproduce your problem, when you do not post the relevant part of the code and the data. Then all we can answ...

9 years ago | 0

Answered
How can I print entered string with restriction of 40 characters per line?
See <https://www.mathworks.com/help/matlab/ref/textwrap.html textwrap>: textwrap(x, 40)

9 years ago | 0

Answered
how to plot these different plots into one by merging the plots and see the difference ,how far its tilted?
Combine by overlapping? What about drawing |y1 - y2|?

9 years ago | 0

Answered
Find if lines intersect
Do you have the mapping toolbox? If so, try <https://www.mathworks.com/help/map/ref/polyxpoly.html>. You find the method usin...

9 years ago | 1

Answered
load not throwing an error, instead printing huge amounts of error info
Without TRY/CATCH you get this additional message: Error using load Unable to read MAT-file /home/alex/superior_colliculus_m...

9 years ago | 0

Answered
There appears to be a bug in the portrand function?
This is the public forum. I suggest to create an example as code, which reproduced the problem, and use the "Contact Us" butt...

9 years ago | 0

Answered
Tic Tac Toe Matrix Check
Note that Board (1,1) ~= 1; Compares the contents of this elements to be different from 1, but nothing is assigned. Ther...

9 years ago | 0

Answered
How to use for loop ?
It does not matter, if B and C are matrices, but you care about the value of the elements only - correctly? for k = 1:numel...

9 years ago | 0

| accepted

Answered
Insert the date and time on an excel file from a .mat file
This might be a job for <https://www.mathworks.com/help/finance/m2xdate.html m2xdate>: date = m2xdate(now); xlswrite('Su...

9 years ago | 0

Answered
How to avoid multiple calls uicontrol when double-clicking it in a gui?
You can check the property 'SelectionType' of the figure to find out, if the current mouse access is triggered by a single or do...

9 years ago | 0

Answered
Storing data as binary strings
Note: '100001101110' is a vector of characters, not a "binary number", although you can treat it in Matlab like it is on...

9 years ago | 0

| accepted

Answered
How to find rotation matrix from vector to another?
Exactly as in your <https://www.mathworks.com/matlabcentral/answers/356698-rotation-matrix-between-two-coordinate-systems-matlab...

9 years ago | 6

| accepted

Answered
How to convert a numeric string into a numeric range?
As long as |eval| processes numbers and the colon only, and does not create a variable dynamically, it is not evil. You could th...

9 years ago | 0

Answered
How to completely reset Matlab's workspace?
system('matlab &') exit See <https://www.mathworks.com/matlabcentral/answers/1093-how-do-i-reset-matlab-to-its-launched-...

9 years ago | 1

Answered
determine if the mouse is pressed in a given moment
It would be easy, if you do not change the WindowButtonDownFcn frequently, but keep it statically and use a |persistent| variabl...

9 years ago | 0

| accepted

Answered
How do I create an animation that plots points on a circle?
axes('NextPlot', 'add', 'XLim', [-1,1], 'YLim', [-1,1]); for k = 1:100 data = rand(); % A value between 0 and 1 ...

9 years ago | 0

| accepted

Answered
Why is MATLAB officially written with capitalized letters?
It is simply a question of taste. The MathWorks decided to print it in capitals. MAtLab: Cleve *M* oler *at* *lab*

9 years ago | 0

Answered
Summation in a for loop of a function
The code does exactly, what you want: sum(n(i : numel(v))) summation of n(k) with k going from i to number of intervals ...

9 years ago | 0

| accepted

Answered
What is problem?
The Variable Editor is not thought to display the contents of huge and/or 3D arrays. It is simply not useful to display them as ...

9 years ago | 1

| accepted

Answered
How can I update plots with large date
You can try <https://www.mathworks.com/matlabcentral/fileexchange/40790-plot--big- FEX: plot(big)>. If this cannot be used direc...

9 years ago | 0

| accepted

Answered
Performance of MATLAB instances over time
|clear all| wastes time by removing all loaded function from the memory. If you want to clear the variables, use |clear variable...

9 years ago | 0

Answered
import a text file into a variable
What exactly is "simple"? fid = fopen(FileName, 'r'); if fid == -1 error('Cannot open file: %s', FileName); end ...

9 years ago | 0

Answered
ODE solver with time-dependent term
Outside the function or as the third column of the output "y" output versus "t", I get different graphs: ... Of course you...

9 years ago | 0

| accepted

Answered
Function definitions are not permitted at the prompt or in scripts
Can't we embed function on our script? Yes. Defining functions in script files was introduced in 2016b. If you have an older...

9 years ago | 0

Answered
How can I get values for f in a matrix of dimension(100,1)?
Since R2016b with auto-expanding: x = linspace(-1,1,10); y = linspace(-1,1,10).'; f = (1-x).^2 + 100*(y - x.^2).^2; f ...

9 years ago | 0

Answered
Fprintf: how to automatically move to a new line when reach end of screen?
Perhaps this helps: Extent = matlab.desktop.commandwindow.size or the undocumented (in R2016b) rows = builtin('_get...

9 years ago | 2

Answered
Is there a way to play audio/run a script when matlab debugger stops at a breakpoint?
This cannot work: What happens if the breakpoint is set in the code, which is called, when the breakpoint is reached? As soon as...

9 years ago | 0

Load more