Answered
How to avoid to delete the title and axis limits of subplots in a loop cycle?
In the 1st iteration, establish your plots with the xlim, ylim, and title all setup. In all other iterations, change the XData a...

8 years ago | 0

Answered
problem in using parralel computing toolbox
You are assigning 3 values, |*l(i),sig2(j),sigf2(k)*|, into one value at |*par(i, j, k)*|, which is not possible. par(i,j,...

8 years ago | 1

| accepted

Answered
My Mathlab code is giving me a wrong answer, and I don't know why.
Move the function handle *f* inside the while loop. The moment a function handle is created, it uses all constants at the CURREN...

8 years ago | 0

| accepted

Answered
()-indexing must appear last in an index expression What is my mistake? method gauss jordan gui
You can't do the following: str2double(get(handles.edit4,'string'))(str2double(get(handles.edit9,'string'))); Did you me...

8 years ago | 0

| accepted

Answered
User input if, else if statement
You need a "==" instead of "=" for comparing values. Here are some other comments: info = menu('More information?', 'Yes', ...

8 years ago | 0

| accepted

Answered
Convert vectors with different names to matrix
You could use the workaround of save/load to get what you want. %Suppose you have these a1, a2 ... an a1 = rand(1, 4000...

8 years ago | 1

| accepted

Answered
Pushbutton in GUIDE gives the error "Undefined function or variable 'Test_wone_file_1'" only if other callback are previously activated
Look at comment :) So, to help you get started with editing your code to handle TRA file in other directories, you need to ed...

8 years ago | 0

| accepted

Answered
Does Matlab Git work in this way??
Yes, if you pushed changes to the remote repo, S:/TEST.m should be the new one. Your colleague will have the old version of TEST...

8 years ago | 0

Answered
How can I replace eval and rewrite the below line?
NEW ANSWER: Inside the FTP.mat is a variable called *ts* storing the timeseries object. To access the contents inside *ts*, d...

8 years ago | 0

Answered
How to delete rows from a matrix if its specific column does not match with another matrix?
One way to do this: A=[1;2;3;9] B=[1,0,5;2,0,6;3,1,4;4,1,4;5,2,4] KeepIdx = zeros(size(B,1), 1, 'logical'); for k...

8 years ago | 1

Answered
How to plot graph using ginput?
To do what you want would require using callback functions. See this video here to understand how it works: <https://blogs.mathw...

8 years ago | 0

| accepted

Answered
"For improved robustness, consider replacing i and j by 1i" - Is this an error?
Matlab uses *i* and *j* for imaginary i, or sqrt(-1). This lead to a lot of issues because *i* and *j* are often used as counter...

8 years ago | 2

| accepted

Answered
How can I stop the program? "Break" - Error
*break* is used to break a for or while loop. Use *return* instead to end the function. Use *error(some error message)* to compl...

8 years ago | 0

| accepted

Answered
The variable "X" might be used before it is defined
Using *load* without an output is essentially "poofing" variables into your function and forcing the rest of the code to "guess"...

8 years ago | 0

Answered
How can I convert the data(numeric and variables) from txt to a matrix?
FID = fopen('DataFile.txt'); %Your data file to open Data = textscan(FID, '%s'); %Load data as string into a cell array ...

8 years ago | 1

| accepted

Answered
Where can I find the source code of conv() function in matlab?
conv.m uses conv2, which is a built-in matlab function and the source code is not available. <https://www.mathworks.com/matl...

8 years ago | 0

Answered
Input parsing of name-value Pairs
You could make your own input-parser that searches for a string within varargin, and if it does not exist, ask users. Try the fo...

8 years ago | 0

| accepted

Answered
How to randomizes the order of the rows of a matrix?
M = [1:100]'; %Your matrix M = M(randperm(size(M,1)),:); %Your randomly permuted matrix by row

8 years ago | 1

| accepted

Answered
How to include this interpolation in a "for" loop?
First, you have to rename all your variables. Labeling your variables x1,x2,x3 ...xn makes it very difficult to use a for loop. ...

8 years ago | 1

| accepted

Answered
Why does not line appear over plot
Using |imshow| will replace the current axes and everything drawn on that axes, including the lines. To fix, use |imshow| once a...

8 years ago | 0

Answered
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
In this statement: A(l, m, kindex, j, n+1)=[a11vec(l, m, kindex, j, n+1),a12vec(l, m, kindex, j, n+1),a13vec(l, m, kinde...

8 years ago | 0

| accepted

Answered
Can anyone please check this "for" loop for me?
clear clc close all C1 = [1.25 1.36]; b = 10; Formula = C1/(sqrt(b)); fid=fopen('file.txt', 'w'); fpr...

8 years ago | 0

| accepted

Answered
Problem in running GUI
Don't use |eval| because it's way too powerful of a function that leads to issues and is slow. It's like using a chain saw to cu...

8 years ago | 1

| accepted

Answered
What is the purpose of arguments 'src' and 'evnt' in callback functions?
Matlab is essentially passing on a standard set of information for any object that has a callback feature: 1) the object that is...

8 years ago | 3

| accepted

Answered
How can I create a new matrix from certain columns from another matrix?
NewMat = LargeMat(:, [1:3 37:42]);

8 years ago | 2

| accepted

Answered
Different computer save folder
Try this out and see if it works. It assumes there an "emg" subfolder. If it can't find it, then it will ask prof to select the ...

8 years ago | 0

| accepted

Answered
Why does it not plot the function?
Only the 1st function, *|ode_metabolism|*, is called since it is considered the main function. Your *|ode_q|* function is vi...

8 years ago | 0

| accepted

Answered
Matlab Trial Version Download
I believe your job is a "student". The rest seem like survey questions to help MathWorks determine interest, which seems like a ...

8 years ago | 0

| accepted

Answered
Avoiding too many figures from loop in GA Toolbox
One way to do this is to create a template figure, and then pass this to your function to prevent creating/closing a new figure ...

8 years ago | 0

| accepted

Answered
Separate one column into 3 when finding a character
New Answer: FID = fopen('data.txt'); T = fscanf(FID, '%f'); fseek(FID, 0, 'bof'); Data = fscanf(FID, [repmat('%f\n...

8 years ago | 0

| accepted

Load more