Risposto

How can I code for something which is running?

Hi, How about this: http://de.mathworks.com/help/matlab/ref/mfilename.html You can use strcmp() to check if the last fi...

How can I code for something which is running?

Hi, How about this: http://de.mathworks.com/help/matlab/ref/mfilename.html You can use strcmp() to check if the last fi...

circa 8 anni fa | 0

Risposto

what is deferent between Matlab2013a "ones" function with Matlab2013b

Hi, you use x and y as function parameters, so they can have non-integer values. But ones() creates a matrix, which needs to ...

what is deferent between Matlab2013a "ones" function with Matlab2013b

Hi, you use x and y as function parameters, so they can have non-integer values. But ones() creates a matrix, which needs to ...

circa 8 anni fa | 0

| accettato

Risposto

Check the code mistake?

Hi, you overwrite T(1,n) in each loop iteration. You must replace either the 1 or the n with q. I don't understand what...

Check the code mistake?

Hi, you overwrite T(1,n) in each loop iteration. You must replace either the 1 or the n with q. I don't understand what...

circa 8 anni fa | 0

| accettato

Risposto

finding average between TFunct1,TFunct2,TFunct3

Hi, how about this: TFunct=zeros(1700,1); % or whatever for i = 1 : 17000 TFunct(i,1)=mean([TFunct1(i,1),TFunct2(i...

finding average between TFunct1,TFunct2,TFunct3

Hi, how about this: TFunct=zeros(1700,1); % or whatever for i = 1 : 17000 TFunct(i,1)=mean([TFunct1(i,1),TFunct2(i...

circa 8 anni fa | 0

| accettato

Risposto

for loop - Error Attempted to access y(30); index out of bounds because numel(y)=2.

Hi, the best is to define y before you use it. y=zeros(100,1) I think your loops are nested in the wrong way. You set...

for loop - Error Attempted to access y(30); index out of bounds because numel(y)=2.

Hi, the best is to define y before you use it. y=zeros(100,1) I think your loops are nested in the wrong way. You set...

circa 8 anni fa | 1

| accettato

Risposto

User input, for loop printing

Hi, this code works: clear all clear clf clear clc user_dia_prcnt = 0; user_age = input('Type your age: ...

User input, for loop printing

Hi, this code works: clear all clear clf clear clc user_dia_prcnt = 0; user_age = input('Type your age: ...

circa 8 anni fa | 0

Risposto

Save 2 Figures from GUI

Hi, I use the saveas() command to save figures. saveas(h,'filename','format')

Save 2 Figures from GUI

Hi, I use the saveas() command to save figures. saveas(h,'filename','format')

circa 8 anni fa | 0

Risposto

Ideas to programatically change all variable names in M-files and SL model?

Hi, I once had a similar problem with changing a lot of variable names. I solved it using Notepad++: open Notepad and then...

Ideas to programatically change all variable names in M-files and SL model?

Hi, I once had a similar problem with changing a lot of variable names. I solved it using Notepad++: open Notepad and then...

circa 8 anni fa | 0

| accettato

Risposto

opening structure in a loop

Hi, perhaps this helps; it's from the Matlab help: filename = 'durer.mat'; myVars = {'X','caption'}; S = load(file...

opening structure in a loop

Hi, perhaps this helps; it's from the Matlab help: filename = 'durer.mat'; myVars = {'X','caption'}; S = load(file...

circa 8 anni fa | 0

| accettato

Risposto

Stop/Continue button in gui

Hi, I suggest you use i as variable in this fashion: - declare i in the OpeningFcn: handles.i = 0 - in the callba...

Stop/Continue button in gui

Hi, I suggest you use i as variable in this fashion: - declare i in the OpeningFcn: handles.i = 0 - in the callba...

circa 8 anni fa | 0

| accettato

Risposto

Error using ~= Matrix dimensions must agree during using while function

Hi, I don't see where you use "mypassword". You declare only the string "password".

Error using ~= Matrix dimensions must agree during using while function

Hi, I don't see where you use "mypassword". You declare only the string "password".

circa 8 anni fa | 0

Risposto

calling one gui from another.

Hi, I used something like this in the callback function in the first gui: run GUI2; handles.GUI2 = GUI2(handles.GU...

calling one gui from another.

Hi, I used something like this in the callback function in the first gui: run GUI2; handles.GUI2 = GUI2(handles.GU...

circa 8 anni fa | 0

Risposto

How to write a for loop inside an if loop

Hi, your first if statement condition includes C<=2000000 but your second if statement wants C to be greater than i, which st...

How to write a for loop inside an if loop

Hi, your first if statement condition includes C<=2000000 but your second if statement wants C to be greater than i, which st...

circa 8 anni fa | 0

Risposto

How to remove the last column in an array

Hi again, I think you should read a bit abot the ":"-operator, it is quite helpful ;) a = 1 2 3 ...

How to remove the last column in an array

Hi again, I think you should read a bit abot the ":"-operator, it is quite helpful ;) a = 1 2 3 ...

circa 8 anni fa | 6

Risposto

i f i have an array a=[1 2 3 4 1;6 7 8 9 2].I need to split this array based on the value in last column.Resultant array b=[1 2 3 4],c=[6 7 8 9]. The splitted array b should contain the row whose last column is 1 and c 2

Hi, here is a solution for your small problem. If a is larger, you can use a loop. b=[]; c=[]; if a(1,end)==1 ...

i f i have an array a=[1 2 3 4 1;6 7 8 9 2].I need to split this array based on the value in last column.Resultant array b=[1 2 3 4],c=[6 7 8 9]. The splitted array b should contain the row whose last column is 1 and c 2

Hi, here is a solution for your small problem. If a is larger, you can use a loop. b=[]; c=[]; if a(1,end)==1 ...

circa 8 anni fa | 0

Risposto

Sort Matrix by rows

Hi, A = 1 2 3 4 5 6 23 45 10 90 11 34 >> A=A' A = ...

Sort Matrix by rows

Hi, A = 1 2 3 4 5 6 23 45 10 90 11 34 >> A=A' A = ...

circa 8 anni fa | 2

| accettato

Risposto

Help vectors size doesn't match...why?

Hi, x_in and x_out have the same length (100). x and y are shorter (52), but I don't know if this bothers your function ma...

Help vectors size doesn't match...why?

Hi, x_in and x_out have the same length (100). x and y are shorter (52), but I don't know if this bothers your function ma...

circa 8 anni fa | 0

| accettato

Risposto

How to sort even and odds elements in an array or vector recursively?

Hi, I don't really get your intention. What are A, B, a and b for? And where do you compute l for the if-statement? It ...

How to sort even and odds elements in an array or vector recursively?

Hi, I don't really get your intention. What are A, B, a and b for? And where do you compute l for the if-statement? It ...

circa 8 anni fa | 0

| accettato

Risposto

&& in if statement returning error

Hi, I had some issues with &&, too. I solved it with using only & (Matlab does not really like it, but it runs).

&& in if statement returning error

Hi, I had some issues with &&, too. I solved it with using only & (Matlab does not really like it, but it runs).

circa 8 anni fa | 0

Risposto

Matlab trying to access index zero of a matrix, even though the boundaries are specified!

Hi, the error occurs for the second line: r=@(i)R-x(i,1); You use i as the argument of that function. So i can have...

Matlab trying to access index zero of a matrix, even though the boundaries are specified!

Hi, the error occurs for the second line: r=@(i)R-x(i,1); You use i as the argument of that function. So i can have...

circa 8 anni fa | 1

| accettato

Risposto

How to open a gui fig file from another gui?

Hi, I use GUI1 to call GUI2 like this: In GUI1: run GUI2; To close it again from GUI1: close GUI2;

How to open a gui fig file from another gui?

Hi, I use GUI1 to call GUI2 like this: In GUI1: run GUI2; To close it again from GUI1: close GUI2;

circa 8 anni fa | 4

Risposto

How can I export figure as png?

Hi, I create a figure and save it with the follwoing command: saveas(gcf,'picture.png') Perhaps saveas(gcf, [inp...

How can I export figure as png?

Hi, I create a figure and save it with the follwoing command: saveas(gcf,'picture.png') Perhaps saveas(gcf, [inp...

circa 8 anni fa | 1

Risposto

Undefined function 'pmveqf' for input arguments of type 'double'. Error in fminsearch (line 191) fv(:,1) = funfcn(x,varargin{:}); Error in vary (line 45) x=fminsearch('pmveqf',[30 30]',[],pm);

Hi, I am not familiar with the function, but I found another post with it. There it is called in this fashion: x=fmi...

Undefined function 'pmveqf' for input arguments of type 'double'. Error in fminsearch (line 191) fv(:,1) = funfcn(x,varargin{:}); Error in vary (line 45) x=fminsearch('pmveqf',[30 30]',[],pm);

Hi, I am not familiar with the function, but I found another post with it. There it is called in this fashion: x=fmi...

circa 8 anni fa | 0

Risposto

How to use the same gui for many times to save variables withe different index?

Hi, It is no problem to call the same GUI several times. You can save the variables in an array and change the static text...

How to use the same gui for many times to save variables withe different index?

Hi, It is no problem to call the same GUI several times. You can save the variables in an array and change the static text...

circa 8 anni fa | 0

Risposto

I want to use fonction (find) to return many values,but why he just returns the least value ? thank you

Hi, c is overwritten in each loop iteration. Define c as a matrix and you can store each result in a line of this matrix.

I want to use fonction (find) to return many values,but why he just returns the least value ? thank you

Hi, c is overwritten in each loop iteration. Define c as a matrix and you can store each result in a line of this matrix.

circa 8 anni fa | 1

Risposto

Matlab editor: the function might be unused

Hi, the easiest way is to make two files: one for func1 and one for func2. (I don't know if you can fix this problem using on...

Matlab editor: the function might be unused

Hi, the easiest way is to make two files: one for func1 and one for func2. (I don't know if you can fix this problem using on...

circa 8 anni fa | 0

| accettato

Risposto

Need help making a for loop

Hi, does x./y solve your problem? Or do you really need a loop?

Need help making a for loop

Hi, does x./y solve your problem? Or do you really need a loop?

circa 8 anni fa | 1

Risposto

Getting error: Attempted to access latent(12); index out of bounds because numel(latent)=11.

Hi, The array latent has only the length 11 and you try to access the 12th entry. for i=1:length(latent) should s...

Getting error: Attempted to access latent(12); index out of bounds because numel(latent)=11.

Hi, The array latent has only the length 11 and you try to access the 12th entry. for i=1:length(latent) should s...

circa 8 anni fa | 0

Risposto

Problem over switch function

Hi, you have to write a function: function P = VanDerWaals(T,V,e) % switch-case % computation of P Since R is t...

Problem over switch function

Hi, you have to write a function: function P = VanDerWaals(T,V,e) % switch-case % computation of P Since R is t...

circa 8 anni fa | 0

Risposto

Attempted to access y(5); index out of bounds because numel(y)=2.

Hi, Since you declare y to be a zeros-vector, you overwrite your input y. Your vector y has only 2 entries. >> y=zero...

Attempted to access y(5); index out of bounds because numel(y)=2.

Hi, Since you declare y to be a zeros-vector, you overwrite your input y. Your vector y has only 2 entries. >> y=zero...

circa 8 anni fa | 0