Answered
How to solve Error using delete. Argument must contain a string.
I guess this is the old problem of using globals: You cannot see, where such variables are changed. A callback of a timer or a G...

8 years ago | 1

| accepted

Answered
Undefined function or variable 'isnan'
Although I assume that Walter hit the point already, I suggest to use teh debugger to identify such problems. Type in the comman...

8 years ago | 1

Question


Strange behavior of the editor in the forum
The editor in the forum is still driving me crazy. With the old version I could at least type my messages in an external editor,...

8 years ago | 6 answers | 11

6

answers

Answered
Whenever I run this code in order to find a number of primes, multiples of 3 and 5 occasionally show up in the result array. Why is this happening?
for i = 2:ceil(sqrt(primepot)) % Why CEIL? What about FLOOR? if mod(primepot,i) == 0 % Impossible: && primepot...

8 years ago | 0

Answered
How can I make my plot fill the entire figure window?
Please post your code. We can see some parts of if in the screenshot, but posting a minimal working example, which reproduces th...

8 years ago | 1

Answered
How does getframe work?
You create a movie with 1 frame only, because film is overwritten in each iteration. Then showing 1 frame 5 times looks like not...

8 years ago | 0

| accepted

Answered
How to check if all the values in the array are greater or equal or lesser than a particular value?
It seems like you are confused by the term "if loop". The if command is not a loop. if needs a scalar condition. If SPEED is a ...

8 years ago | 2

| accepted

Answered
Remove rows using Cellfun satisfying customised function
A bold guess: You have redefined abs, mean or std by a variable. Then trying to access these functions must fail. Check this usi...

8 years ago | 0

Answered
How to do this without a loop
The code is not useful currently. What is the purpose of: Time(:,1)=Time(:,1) ? It does nothing but polluting the command wind...

8 years ago | 0

Answered
Sir i have 200.mat file in one folder and i want program that read it automatically without merging the files
file_all = dir(fullfile(PathName,'C:\User:\DELL:\Desktop:\F1folder:\1')); This is strange: User names and other folder names ca...

8 years ago | 1

Answered
How to read txt files with variables in the file name?
% Replace "p1, p2, p3" by smarter names... p1 = [1 2 3 4 5]; p2 = [0.1 0.2 0.6]; p3 = [40 50 60 70 80 90]; for i1 = p1 ...

8 years ago | 2

| accepted

Answered
I am able to compile the mex successfully using ,MinGW64 Compiler. But still Iam facing the below issue.
The error message is clear: The code inside fsm3b_rx tries to allocate a matrix, which would need 17 Exabyte RAM. There is no ma...

8 years ago | 0

Answered
How to repeat the content of a listbox in gui matlab?
Maybe you mean: data = get(handles.edit_T,'string'); data = cellstr(data); set(handles.edit_Texp, 'string', repmat(data, 1000...

8 years ago | 1

| accepted

Answered
Why textread in MATLAB error?
I guess, that the path is missing when you open the files: listf = dir('E:\New folder (5)\data\*.txt'); n = length(listf);...

8 years ago | 0

Answered
Selecting submatrix takes long
The growing and shrinking of array is expensive, because Matlab has to allocate new arrays each time and copy the old contents (...

8 years ago | 0

| accepted

Answered
optimize code with multiple for loops
It depends on the magic parts "% huge euation calculation" and "% comparison with experiment data" if the loops can be avoided. ...

8 years ago | 0

Answered
kid-axis-coordinates in mother-axis problem
What is a "mother axis" and "kid axis"? Do you mean an uipanel and an axes object? Maybe the code of https://www.mathworks.com/h...

8 years ago | 1

Answered
Create aa difficult matrix in a loop
With some bold guessing: n = 2; R = -ones(n+1, n, n+1); v = 1:n+1; for k = v R(v(v ~= k), :, k) = eye(n); end R = res...

8 years ago | 2

| accepted

Answered
logarithmic plot function failure
Where do you see a failure? If the argument of the logarithm is smaller then e (which is exp(1)), the output must be negative. ...

8 years ago | 0

Answered
read a text file, use strcmpi function
toggle = true; while toggle % not required, because it is a logical already: == true aline = fgetl(fid); toggle = ~s...

8 years ago | 1

| accepted

Answered
Vector normalization giving error in second iteration
You have redefined "norm" as a variable in: norm = 1./eta; Afterwards you cannot access the function norm() directly anymore. ...

8 years ago | 1

| accepted

Answered
Difference between angle2dcm and eul2rotm (same angle sequence, different result)
R1 = angle2dcm(-0.9277, -0.0553, -0.1741, 'ZYX') R2 = eul2rotm([-0.9277, -0.0553, -0.1741], 'ZYX') Do you see that R1...

8 years ago | 0

Answered
Does line() function works in matlab R2015b ?
"h is subplot(4, 12, 1:12)" - this is not clear. Is h a scalar or a vector? The message is clear: [thisX, thisX] and ylim(h) do...

8 years ago | 1

Answered
Generating a new pushbutton on button press
While I do not know, what a "mutliple choice RPG" is, and " doing this would be on buttonpress" is not clear also, modifying a b...

8 years ago | 0

| accepted

Answered
How to read a value at the end of char from a text file?
Are the files "small" (< 1kB)? Then: C = strsplit(fileread(FileName), '\n'); Key = 'Number of windows' mKey = strncmpi...

8 years ago | 0

Answered
Efficient online plot?
What is the problem you want to solve? Matlab creates new data in each iteration by: Y = rand(100,3); The former values are no...

8 years ago | 0

Answered
Interactive animation while solving ODE
You can use the event function to trigger an external event: Opt = odeset('Events', @yourEvent); t0 = 0; tEnd = 1000; ...

8 years ago | 3

| accepted

Answered
How to Estimate the exponent a?
You have the equation P ~ exp(-aT). You determine the value of P by the simulation and have T as input parameter. Then it seems ...

8 years ago | 0

Answered
Error creating using xlswrite function
Some comments: path='C:\Program Files\MATLAB\R2010a\toolbox\catool'; Do not shadow theportant function path by a local variabl...

8 years ago | 1

| accepted

Load more