Risposto
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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 1

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

| accettato

Risposto
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); ...

circa 12 anni fa | 0

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

circa 12 anni fa | 2

| accettato

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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

Risposto
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

circa 12 anni fa | 0

| accettato

Risposto
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

circa 12 anni fa | 0

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

circa 12 anni fa | 0

| accettato

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

circa 12 anni fa | 0

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

circa 12 anni fa | 1

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

circa 12 anni fa | 0

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

circa 12 anni fa | 1

| accettato

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

circa 12 anni fa | 0

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

oltre 12 anni fa | 1

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

oltre 12 anni fa | 0

Risposto
Plot continuous on time
use hold on command

oltre 12 anni fa | 0

| accettato

Carica altro