A résolu


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

environ 14 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

environ 14 ans il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

environ 14 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

environ 14 ans il y a

Réponse apportée
Create a monthly date vector of serial numbers
%% x=bsxfun(@(Month,Year) datenum(Year,Month,1),(1:12).',1980:2010); x=x(:); diff(x)

plus de 14 ans il y a | 1

Réponse apportée
Can the "menu" user dialog have multiple outputs?
use listdlg() and set the 'SelectionMode' as 'multiple'

plus de 14 ans il y a | 0

Réponse apportée
Webinar - PDF?
All the information are <http://www.mathworks.com/matlabcentral/fileexchange/29489 here>.

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Matlab matrix
Along the line of this code, depending on your data format. ID={'ID1','ID2','ID3','ID5','ID6'}.'; Col2=[54 45 23 32 75 87]....

plus de 14 ans il y a | 2

Réponse apportée
How to avoid algebraic loop problem
It depends. But you can start from here. <http://www.mathworks.com/help/toolbox/simulink/ug/f7-8243.html#f7-19688 Algebraic Loop...

plus de 14 ans il y a | 0

Réponse apportée
how to record and use the history of a variable in simulink
I don't know if you can change the number of previous steps dynamically. If the number is not large, you can always record the m...

plus de 14 ans il y a | 0

Réponse apportée
activex PowerPoint Application Saving as ".ppt" default, not ".pptx" ?
try invoke(op,'SaveAs',filespec,11); 11 is ppSaveAsDefault. Go to PowerPoint help, Visual Basic Reference, Enumerations, PpSaveA...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Mask dialog box too small, adds verticle scrollbars
Look at maskedit.m, the function CreateMaskEditor() decides the size of the dialog based on the screen size. Maybe you can modif...

plus de 14 ans il y a | 0

Réponse apportée
adding "Rate_Transition" block via Add_Block() error
Use add_block('built-in/RateTransition', ...) without the white space. This could be improved on the TMW side. If you look at d...

plus de 14 ans il y a | 0

Réponse apportée
lsim with nonzero initial condition
You can't use lsim(A,B,C,D,...). You need to use Sys=ss(A,B,C,D); y=lsim(Sys,u,t,X0); *UPDATE*: You can't arbitrarily set ...

plus de 14 ans il y a | 0

Réponse apportée
3d plotting of experimental data
try surf(YourMatrix) mesh(YourMatrix)

plus de 14 ans il y a | 0

Réponse apportée
Slice matrix upon "group ID" to get the mean
%% x = [1,2,3,4,5,6,7,8,9,10]; % Data y = [1,1,1,2,2,1,2,1,1,5]; % Vector containing the group id [GroupId,indx_i,i...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Getting a higher resolution bode plot
You can specify the frequency vector for the bode plot. But more seriously, you are not using feedback() and bode() correctly. Y...

plus de 14 ans il y a | 0

Réponse apportée
Median() ignoring zeros
You probably need to do a for-loop. %% Col=size(A,2); B=zeros(1,Col); for k=1:Col B(k)=median(A(A(:,k)~=0,k...

plus de 14 ans il y a | 0

Réponse apportée
PWM and Subusystem problems
By default, the Scope has a limit of 5000 data points. Double click the Scope block, click the second icon on the top for "Param...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Reordering columns in a matrix
If you have to do this, you can use subsref() %% a=magic(3) b=subsref(a,substruct('()', {':',[2,1,3]})) In your case, it...

plus de 14 ans il y a | 0

Réponse apportée
Problems with multiplications (matrix dimensions must agree) on F5, but not on F9
Your variable 'probabilidadeDeExtincao' is an input argument to the function, while it is also a global variable. This could be ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Just a small problem
function y=MyRandInt while true y=floor(8999*rand+1000); if length(unique(num2str(y)))==4 return; ...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
Fixed step size in a DC Motor Simulation
Your system is continuous. Try ode45 with variable step size first.

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Help with Function please !
Please don't do this. Follow this thread. <http://www.mathworks.com/matlabcentral/answers/143-how-do-i-make-a-series-of-variable...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Computing values from a subsection of a data file
Very close. Just missed one dot. %% %z1 = data(1:10,2); z1=zeros(10,1); Rz1 = 1./(sqrt(4*z1.^2 + 1))

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
imwrite filename
R='MyImageFile'; imwrite(X.cdata,[R,'.png']);

plus de 14 ans il y a | 0

Réponse apportée
Simulink Model made in Matlab 6.5.1 (R13SP1) doesnot work in higher versions
Open your old version of Simulink model in the new version of Simulink software and do a save-as. Pay attention to any messages ...

plus de 14 ans il y a | 0

Réponse apportée
if loop not executing
if-else statement won't do any loop. I assume this is an exercise. You almost need to re-work on the code completely. "multipl...

plus de 14 ans il y a | 0

Réponse apportée
evalin('base', 'save('var1', 'var2')')
You need to pay attention to the syntax for using single quote inside the single quote. You could do. evalin('base', 'save(''...

plus de 14 ans il y a | 0

Réponse apportée
In 2007b, block paths having more than 1290 characters are not recognized.
I am not sure if such limitation exists, even in R2007a. Let's see if it is something else. I assume you want to open a subs...

plus de 14 ans il y a | 0

Charger plus