Beantwortet
Where do MATLAB-created .txt files get saved?
If you do not specify a folder, the current directory is used. See help cd help pwd Note, that pwd is just a wrapper function...

fast 5 Jahre vor | 2

| akzeptiert

Beantwortet
Why my code doesn't execute correctly in other computers while works correctly in my computer?
The error message means, that the function coesamethod.m was not included during the creation of the executable. Try to include ...

fast 5 Jahre vor | 1

Beantwortet
Matlab is significantly slower than Julia on simple evaluation
I can confirm your observation that Julia runs faster than Matlab for some problems. Answering your three questions is not easy ...

fast 5 Jahre vor | 7

Beantwortet
How can I make a gif using subplots and avoid an error in function wgifc?
The calling style "subplot(121)" is outdated for over 20 years now. Use subplot(1, 2, 1) instead. You can simplify: reshape(fr...

fast 5 Jahre vor | 1

Beantwortet
Is it ok for my optimization problem to take 2 hours to be solved?
This amount of runtime is either required, or caused by a bad programming technique, e.g. a forgotton pre-allocation or by perfo...

fast 5 Jahre vor | 0

Beantwortet
How to recursively reduce the function arguments
This should work with str2func and eval. This is such a cruel programming technique, that I recommend not to use it. Such meta-...

fast 5 Jahre vor | 0

Beantwortet
Storing different size cell array into a cell array.
Either copy only the existing elements and let the others be []: C = cell(24, 6); A = cell(1, 6); % Some test data A(:...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
progrem witch sort matrix from user
k = 1; % Avoid "i" to reduce confusions with the imaginary unit ready = false; mat = {}; while ~ready mat{k} = i...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
Requires uihtml an additional toolbox?
uihtml belongs to the standard toolboxes of Matlab. So you do not need a toolbox for this.

fast 5 Jahre vor | 0

Beantwortet
what is the output type of a nagative fullfill function result
What is the purpose of the leading space in " \*.txt"? What does "if i did not select the subfolder" mean? Which subfolder? Do ...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
How do I create a loop for an equation using if statements?
Use "logical indexing": y = rand(1, 100); t = 0:99; % Prefer the cyclenumber, not the seconds c = 17; index = (t == 0)...

fast 5 Jahre vor | 0

Beantwortet
Unable to plot graphs
for f = 1:N Ms(f)=input(['Load Number:'num2str(f)','Cycles done:']); f=f+1; end This is not the way for loops work ...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
Simplifying output in Matlab
The magnitude of the variables does not matter. For a computer, the addition of pi + 1.23456789, pi + 1.0 and pi+ 1.23456789e37 ...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Converting cosine to exponential form
cos(x) = 0.5 * (exp(1i * x) + exp(-1i * x)) exp(ix) = cos(x) + 1i * sin(x) I do not understand, why the desired output is (-1)...

fast 5 Jahre vor | 1

Beantwortet
Expression to check if a matrix is a strict lower triangular one
You can stop the loops, if the first not matching element is found. Abbreviate the code by checking only the elements right fro...

fast 5 Jahre vor | 0

Beantwortet
Change localization of files
if 1i == 1 This not true in any case. 1i is the imaginary unit. sqrt(-1) is not equal to 1 in any case. It is not 2,3,4,5,6 als...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
Can't use for loop in matlab app designer
m = 3; disp(m) for i = 1:m % Not: length(m) disp('I loaded') end m is a scalar. Then length(m) is 1. A for loop from ...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
function requires more input arguments to run
The call of ODE45 is inlcuded in the function to be integrated - twice. I guess, that you see the error message, when you click ...

fast 5 Jahre vor | 2

| akzeptiert

Beantwortet
How to get rid of the Error in Transcendental equation ?
Use the debugger to find out, what's going on: dbstop if error Matlab will stop in this line: NEFF1(ii)=double(vpasolve(Eqn))...

fast 5 Jahre vor | 0

Beantwortet
I am trying to plot a graph for a second order ODE for the midpoint method.
t1 = 1:10; % A bold guess dt = t1(2) - t1(1); A = zeros(2, length(t1)); B = zeros(2, length(t1)); Now A and B ha...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Increase SPEED of nested for loops???
Use the profiler to find out, where the time is spent. If it is inside the sim() command, you have to modify this block, because...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
input symbolic parameters in ode45
ODE45 integrates numerically. It does not offer a symbolic solution.

fast 5 Jahre vor | 0

Beantwortet
The variable already defined ,but in the design apps it cannot recognized the variable.
Why do you assume, that "the variable A is already defined", if Matlab displays clearly, that it is not? What is your input Ene...

fast 5 Jahre vor | 0

Beantwortet
Sharing a folder doesn't work (No permission)
Does the number of shared folder exceed the limits? See: https://www.mathworks.com/help/matlabdrive/ug/share-and-collaborate-on-...

fast 5 Jahre vor | 0

Beantwortet
How to change the fontsize of labels not axsis.
h = gca; h.FontSize = 8; % here is problem. This changes the font size of the complete axes object. If you want to change the ...

fast 5 Jahre vor | 0

Beantwortet
Change Name of String in Cell Array if Repeated More Than Once...
Do I understand correctly, that your question is: I have a cell string. How do I count the number of repetions of each char vec...

fast 5 Jahre vor | 0

Beantwortet
Hello I need MATLAB help
See: FAQ: Process sequence of files

fast 5 Jahre vor | 0

Beantwortet
How can I make 1 by length x array of random numbers from -pi to pi ??
See: help rand % Generate values from the uniform distribution on the interval (a, b): r = a + (b - a) .* rand(x, 1); Now ...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
Counting x times zeros in a row on a given sequence
The question is not uniquely clear yet: What is the wanted answer for e.g. 20 subsequent zeros? Should the be counted as 1, 2 or...

fast 5 Jahre vor | 1

Beantwortet
How to extract contiguous sequences of 3 items from the given sequence
If you really need the same (strange) format as for 2 elements: seq_three = cellstr(num2str([a(1:end-2); a(2:end-1); a(3:end)]'...

fast 5 Jahre vor | 0

| akzeptiert

Mehr laden