Beantwortet
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...

mehr als 8 Jahre vor | 0

Beantwortet
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,...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
()-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...

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

Beantwortet
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...

mehr als 8 Jahre vor | 0

Beantwortet
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...

mehr als 8 Jahre vor | 1

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
"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...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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"...

mehr als 8 Jahre vor | 0

Beantwortet
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 ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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. ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 3

| akzeptiert

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

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
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 ...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 8 Jahre vor | 0

| akzeptiert

Mehr laden