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

más de 8 años hace | 0

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

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

más de 8 años hace | 0

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

más de 8 años hace | 1

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 2

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 0

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

más de 8 años hace | 0

| aceptada

Respondida
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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 0

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 3

| aceptada

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

más de 8 años hace | 2

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

Cargar más