Answered
Finding the exponential of a very small number
The more exact numerical output is - as expected: 1.000000000000000000000035283936502268180000000622478087548... If you ...

9 years ago | 0

Answered
I'm trying to plot this graph with the x-values between -10 and 50, but the graph plots them between 0 and 60?
a = bin2dec('00010101'); b = bin2dec('00010010'); c = bin2dec('11000101') x = -10:50; % Nicer and faster than: [(-10...

9 years ago | 0

| accepted

Answered
Convert to a function
If you really want to use this code instead of the built-in function of the Matlab toolbx (see Andrei's answer), start with: ...

9 years ago | 0

Answered
How to improve the speed of Matlab numerical integral?
What do you expect? There is no magic flag to increase the speed and no better function, which is not mentioned in the documenta...

9 years ago | 2

Answered
Finding min values in structure array
This struct is impractical for searching, as well as it is to search for a minimum in values stored as strings. But it works: ...

9 years ago | 0

Answered
How do I create a sequence which goes from 1 to .000001?
The |power| operator is expensive. It is more efficient to use cumprod(repmat(0.1, 1, 6)) If this is a homework, I leave...

9 years ago | 1

| accepted

Answered
I have 5 different "pathdef.m" files in various locations. Are they all necessary? If I want to affect a change, do I have to edit everyone of those?
You need to edit either C:\Users\01234567\Documents\MATLAB or C:\Program Files\MATLAB\R2017b\toolbox\local You ...

9 years ago | 0

| accepted

Answered
I want to draw an arrow in vector.
Search in the FileExchange for the keyword "arrow": <https://www.mathworks.com/matlabcentral/fileexchange/?utf8=%E2%9C%93&ter...

9 years ago | 0

Answered
How to avoid variable name warnings when using filenames as variable names
The name of an Excel file need not and should not be a valid Matlab name. s = 'stuff1_2_3.xlsx' Data = xlsread(s); ...

9 years ago | 2

Answered
How to write excel-file correctly?
The problem was solved in the comments already. Now as an answer: A = {1x1 cell} {1x1 cell} {1x1 cell} The co...

9 years ago | 0

Answered
Could I remove the Directory "C:\Users\<MyName>\Downloads\MathWorks"?
There is an extremely cheap method to test this: rename the folders and see, if everything is working fine. This folders con...

9 years ago | 0

Answered
how to vectrorized this code?
nump = (1:10) .* (1:10).'; % Auto-Expand >= Matlab R2016b For older Matlab versions: nump = bsxfun(@times, (1:10), (...

9 years ago | 0

| accepted

Answered
division of two vectors
|C = A / B| determines the matrix C such that: C * B = A Try it: A = [-1;1;7]; B = [5;7;-2]; C = A / B; C ...

9 years ago | 2

| accepted

Answered
Which is the most appropiate loop if I want to create a vector myOrder(n) with random values?
What about a vectorization: vec = [1 1 1 1 3 1 4 1 1 5 5]'; match = (vec == 1); vec(match) = rand(nnz(match), 1); ...

9 years ago | 0

Answered
Error in running the File exchange project
The error message is clear: You cannot open the specified file for writing. This means, that you either do not have write access...

9 years ago | 0

Answered
MATLAB plotting problems...
A simplified version of your code: g = 9.8; c = 14; v = 35; t = 60:70; y = (14*35) ./ (m * 9.8); % [EDITED, f...

9 years ago | 2

Answered
Killing a (mex) Function When It Doesn't Respond to Ctrl-C or Ctrl-Break Under WIN64
No, you have to kill the Matlab process.

9 years ago | 2

| accepted

Answered
How to open output of Matlab to new command line window
There is *one* command window only, and this is a good idea. If a Matlab session have multiple command windows, it would not be ...

9 years ago | 0

| accepted

Answered
Is it possible to use GUI's callback functions with another Matlab program?
Did you implement the code for the communication with the controller directly in the callback functions of the GUI? This would b...

9 years ago | 0

| accepted

Answered
How to print multiple figures to same PDF page?
Instead of printing 2 figures on one PDF page, it would be much easier to copy the objects of two figures to one figure and expo...

9 years ago | 0

Answered
No ticks being displayed when using XTickLabel
Can you post a minimal example, which reproduces the problem? E.g. this works fine: plot(1:10, rand(1, 10)) set(gca, 'XT...

9 years ago | 2

| accepted

Answered
FIND function for two different sets
I guess, that you do not mean i > max(X)-(i*r) but [maxV, maxIdx] = max(X); i > maxIdx - (i * r) and equivale...

9 years ago | 0

Answered
extract user defined data from matrix in GUI
DataSet = [ ... 1 2 3 4 5 6; ... 5 6 7 8 9 10; ... 10 20 30 4...

9 years ago | 0

Answered
how can i store a value of a calculation in a loop
Store the vectors in a matrix using the loop counter as index: quant = zeros(length(hplid), 3); % Pre-allocate!!! for k...

9 years ago | 0

Answered
hintializing variables with different numbers and saving them in a matrix
This is asked daily for many years now. See: * <https://www.mathworks.com/matlabcentral/answers/57445-faq-how-can-i-create-va...

9 years ago | 0

| accepted

Answered
computing lu factorization with pivot
Your code to determine L contains a bug. What else could be a possible answer to your message? I recommend to ask a specific ...

9 years ago | 0

Answered
What are the main reasons why you don't switch to Julia language and stay in MATLAB?
I have a well working and exhaustively tested set of toolbox functions with some hundreds of thousand code lines (plus blank lin...

9 years ago | 3

Answered
Open .raw file
Do you get "-1" for |fid| or for |A|? In the first case, there is no file with this file name. In the second case, the file cont...

9 years ago | 0

| accepted

Answered
Subscript indices must either be real positive integers or logicals. error How it can be resolved ??
for satir=0:1:1453 for eleman=0:1:1453 vektor(satir,eleman) = ... In the first iteration you get: vekt...

9 years ago | 1

| accepted

Answered
lu decomp. with pivoting
The readers have to guess, what happens in the subfunctions. Not useful. Perhaps you want: [L,U,P] = LU_pivot(A); for...

9 years ago | 0

Load more