Answered
how to find a value of matrix in a specific position?
if(A(2,3) == 5) ...your code elseif(A(3,1) == 89) ...your code end

11 years ago | 0

| accepted

Answered
find similar element in a matrix
First question: create X = zeros(10,4); then plug in you vectors, e.g., X(1,1:numel(v1)) = v1; Second ...

11 years ago | 0

| accepted

Answered
Create new column for data after each iteration of a for loop
It seems that the vector t could be of different size at each iteration, depending on the if condition. If that's the case, cons...

11 years ago | 1

Answered
3 lines and 3 different y axes on one plot?
First, you need to pass the parameter to the ode function. I cut and pasted them there but you can add them after l in the ode c...

11 years ago | 0

Answered
area of intersection of two ellipses??
with polybool and polyarea

11 years ago | 0

| accepted

Answered
How can I print the output data in different way?
V_x1 = reshape(V_x1',1,[])

11 years ago | 0

Answered
question regarding reading .dat file in matlab
If the file is like the one you have posted, you can use the load command

11 years ago | 0

| accepted

Answered
How can I check whether the strictly positive elements of each row of a matrix are equal?
B = zeros(size(A,1),1); for i = 1:size(A,1) temp = A(i,:); temp = temp(temp>0); temp = unique(temp); ...

11 years ago | 0

Answered
Save the listing of files in a directory to a textfile
fid = fopen('myfile.txt','w'); for i = 1:length(fileList) fprintf(fid,'%s\n',fileList{i}); end fclose(fi...

11 years ago | 2

| accepted

Answered
Defining matrices to solve Ax=b using a(i,j)=-1+2max(i,j) and b(j)=sum(j to n) a(i,j)
Replace your code with: summ=0; for j=1:n summ=sum(A,2) end so there is no confusion between the variable s...

11 years ago | 0

| accepted

Answered
Please help, I wrote a matlab code for the Simple Subspace Iteration. But the iteration does not to stop
You have to calculate res in the while loop for it to end at some point.

11 years ago | 0

| accepted

Answered
how can we predict coordinates of point by intersection of two curves in matlab.
If you have the points composing the two curves, you can use intersections. http://www.mathworks.com/matlabcentral/fileexchan...

11 years ago | 0

Answered
How to use a set of variables from an xlsx file
Look up xlsread

11 years ago | 0

Answered
how to remove NaN from anon function?
If x is the array in which you want to remove the NaN: x(isnan(x)) = 0;

11 years ago | 0

Answered
How can i reset a plotted line everytime I draw a new one?
Before plotting the new variable: delete(fig_handle) and replace the last line in your code with: fig_handle = line...

11 years ago | 0

| accepted

Answered
How can i pass an index to ode function?
You will need check the time into the fun and pass both A and t to it. You want something like: [t,f]=ode45(@(t,x)fun(t,x,t...

11 years ago | 0

Answered
How to add text to a video in matlab?
Use text for the frame of interest

11 years ago | 0

Answered
Solve system of ode
How to call the solver: [t,Y] = ode45(@(t,x)sisdif(t,x,Fcm,m,Cx,r,R,Iy),[t0 t1],initialConditions); where [t0 t1] is the...

11 years ago | 0

Answered
How can i display guitar 6 string in gui
You can insert static text or an edit box in your gui and refresh its content every 0.5 s with the strings you've shown in the p...

11 years ago | 0

Answered
How do I import this CSV file?
Save the file as xls or xlsx and then use xlsread to import the parts of the file that you need

11 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions
The variable dis is 1 by 8 while you ask the code to access dis(k,l) with k from 1 to 50

11 years ago | 0

Answered
How do you print data from a loop into a Matrix?
You always write in the same cell, that's the issue. Before the while loop, define a variable to count how many times you prin...

11 years ago | 0

| accepted

Answered
reading a csv file with a multiline header and alphanemeric dataset
[~,~,a] = xlsread('file.xlsx','M18:M53'); for i = 1:length(a) if(~isnumeric(a{i})) a{i}=0; elseif(isna...

11 years ago | 0

Answered
check if a variable in a structure exist
Use: ispresent = isfield(handles,'Y2') See help isfield for more infos.

11 years ago | 1

Answered
two data in one plot graph
figure plot(x,y1,x,y2) or plot(x,y1,'r',x,y2,'b') if you want to assign colors to the curves. If you want to ...

11 years ago | 0

Answered
How can I read in the integer data from an alphanumeric formatted text file?
fid = fopen('myfile.txt','r'); n = 18; % characters that you want to eliminate 61583552011XXX262 nrow = 100; % numbe...

11 years ago | 1

| accepted

Answered
how to find a string within a filename?
Try looking up the strfind command.

11 years ago | 0

Answered
Flow of control in GUIs
The callback functions are called when you interact with a component in the gui. So, for instance, when you click on the pushbut...

11 years ago | 1

Answered
Writing a function for a Projectile?
You do not recalculate x in the loop. Is it possible that it should have been: x=(horizontal_position_change+x); in the...

11 years ago | 0

Answered
Plot continuous on time
use hold on command

11 years ago | 0

| accepted

Load more