Réponse apportée
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...

presque 9 ans il y a | 0

Réponse apportée
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,...

presque 9 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
()-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...

presque 9 ans il y a | 0

| A accepté

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

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

Réponse apportée
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...

presque 9 ans il y a | 0

Réponse apportée
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...

presque 9 ans il y a | 1

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
"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...

presque 9 ans il y a | 2

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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"...

presque 9 ans il y a | 0

Réponse apportée
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 ...

presque 9 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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

presque 9 ans il y a | 1

| A accepté

Réponse apportée
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. ...

presque 9 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 3

| A accepté

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

presque 9 ans il y a | 2

| A accepté

Réponse apportée
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 ...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 9 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 9 ans il y a | 0

| A accepté

Charger plus