Réponse apportée
How can I detect end of lines in a output string of a dos command?
CR and FR are carriage return and line feed. Most of the notepad type application do not show it. The reason strfind does not...

environ 12 ans il y a | 0

Réponse apportée
How to change the axis limits?
From the plots you posted, I can see that your output and your expected outputs are different. The original plot's steady output...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How to plot an equation with two independent and one dependent variable?
There is one difference between the equation and your code (however that does not fixes the issue though). l=53; w=...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
query about using a function
I dont see the file attached. However, once you open that function in matlab, you'll see something like tyhis on the first line:...

environ 12 ans il y a | 0

Réponse apportée
Problem in exporting figure: Can anyone fix a bug in this code?
One thing that you can do manually is once the figure is plotted. On the figure, go to File > SaveAs and save manually as pdf. ...

environ 12 ans il y a | 0

Réponse apportée
Accessing data within astructure
you can access each array as anotace.borders.Y{i} where i is the i'th array in the structure.

environ 12 ans il y a | 0

Réponse apportée
How can I clear columns and rows of a matrix?
A(B,:) = []; A(:,B) = [];

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How to subplot graphs with more than 4 y-axis in a figure?
Use the ploty4 version attached. I have modified it to do what you want. You can use it like this: h1 = subplot(2,1,1); ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
how to run a for loop for a varying no. of times in matlab?
You can use while loop something like this: n=7; %fixed k=0; val_flag = 0; while (val_flag < n+k) statements; ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
new to matlab. trying to plot simple line and not successful from a script file!
Here you go: h = 0.1; r = 0:0.1:0.1*50; z = 0.1:0.1:1; fileID = fopen('my_p_data.txt', 'wt'); rr = {'b','r','k'...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Strcmpi and while loop in a script
tf = 0; comp_fav_day = 'monday'; %Lets say while (tf == 0) answer=input('favorite day?\n' , 's'); tf = strcm...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Reconstructing the image from specific number of coefficicents
One thing I see first is that M = 2^(-128) = 2.93e-39 and thus m = 5.42e-20 m is not an integer, thus J(1:m,1:m) would not work...

environ 12 ans il y a | 0

Réponse apportée
How to display the result of a cycle in a single matrix of a certain size
I think you are looking for something like this: m=[1 0 2 3 5 7 1; 1 0 2 3 5 7 1]; lnew = zeros(2,56,'int8'); for k=1...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
I want to store the values obtained in a for loop and plot the values.Everytime I tried to plot only the last value obtained is plotted,how to plot the values obtained store in SIR
The reason why it is not plotting anything because SIR had only the last loops value in your code. Try something like: fl...

environ 12 ans il y a | 0

Réponse apportée
Reduce the steps within this code
R = fft2(f); s = sort(abs(R(:)),1,'descend'); %s = s(end:-1:1); T = s(M+1); %R = R.*(abs(R)>T); f1 = real(...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How to write a script
Something like this? function myProg myMat = input('Enter 4x4 Matrix\n'); Useropt = input('Row [1] Column [...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Problem with axes in GUI
You will not get this issue if you remove handles = guihandles(); handles structure is available to all functions. in the sec...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Why axis labels disappear when trying to assign their position?
I think you need to play with the size of your figure i.e. using 'Position' property along with 'OuterPosition'. Like, I tried t...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Finding solution of integral by using areas under the function curve
Lets say you want to integrate from x = a to x = b (I am taking a = 0 and b = 2), you can change accordingly for your system. ...

environ 12 ans il y a | 0

Réponse apportée
Result only printed on screen and show in the ans variable in the workspace
If the assigned variables in your code are different than sortedWords, they wont show up in the workspace because they are only ...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
new to matlab. trying to plot simple line and not successful from a script file!
This might work. h = 0.1; r = 0:0.1:0.1*50; z = 0.1; p = sqrt((1+(2*z*(r)).^2)./((1+(r).^2)+(2*z*(r)))); plot(p...

environ 12 ans il y a | 0

Réponse apportée
For loops in Matlab
I think simple doing C = [A' B']; would work. You dont need to do this in a loop.

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Error: index out of bounds
I think you need to rethink how you need to write this. The reason the error is there because in every loop you are defining xp ...

environ 12 ans il y a | 0

Réponse apportée
newton-raphson please help
function ra = myfunc(x) % x the input F = x*(x-1)*(e^x); and seperately, functin dif = mydiff(x,h) dif = (myf...

environ 12 ans il y a | 0

Réponse apportée
indexing into a matrix to eliminate a loop
I am assuming that GPOL and F1 are of same size. Then instead of: for ii=1:nh Zi = Z0; Zi(sub2...

environ 12 ans il y a | 0

Réponse apportée
Problem in CurrentFigure or in gcf
Because UserData is not defined for other callback functions. That is why you cannot access UserData with other pushbuttons. You...

environ 12 ans il y a | 0

Réponse apportée
Program doesn't calculate with input
I am not sure if why you defining P inside the function if you are taking it as a input. Moreover, I think you need to ask for ...

environ 12 ans il y a | 0

Réponse apportée
How to combine random size arrays in one matrix - in a loop?
how about: matrix = zeros(10,10); flag = 1; for i = 1:10 m = randi(10); matrix(1:m,flag:flag+m-1) = rand(m); ...

environ 12 ans il y a | 0

Réponse apportée
Troubles with plotting two functions in one graph
Few errors: like U1 = P/I. This is invalid operation as I is a matrix. To do this you use '.' operator. Similarly for ^, you wil...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Methods to make(fit) the samples of two signals for averaging them
Your s1 and s2 are 1x363 and 1x411 matrixes. Now what you're interpolating is essentially interp1(s1,s1,_blah_) which is simply ...

environ 12 ans il y a | 0

Charger plus