A résolu


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

environ 12 ans il y a

A résolu


radius of a spherical planet
you just measured its surface area, that is the input.

plus de 12 ans il y a

Réponse apportée
Can anyone please tell me how to apply load to a wound-rotor Induction machine?
Are you using SimPowerSystems? Go into the help, click on the SimPowerSystems section, and select "Examples" or "Demos". Thi...

plus de 12 ans il y a | 0

| A accepté

A résolu


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

plus de 12 ans il y a

A résolu


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

plus de 12 ans il y a

Réponse apportée
Euler's Equation for Dummies
You have the statement while y(i)>0 before the loop where i is defined. Perhaps add i=1 before that?

plus de 12 ans il y a | 0

| A accepté

A résolu


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

plus de 12 ans il y a

A résolu


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

plus de 12 ans il y a

A résolu


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

plus de 12 ans il y a

Réponse apportée
Is there a code in matlab for Discrete Tchebichef Transform (DTT)?
<http://en.wikipedia.org/wiki/Discrete_Chebyshev_transform>

plus de 12 ans il y a | 0

A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

plus de 12 ans il y a

A résolu


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

plus de 12 ans il y a

A résolu


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

plus de 12 ans il y a

Réponse apportée
how to plot a 3d function (with two independent variables)
ezplot() is a 2d function. ezsurf() will give you 3d. ezsurf(char(eucara),[0 1000 0 1000]) <</matlabcentral/answers/u...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to create a closed loop with initial solution
You can feedback your previous result using a delay block or memory block. The intial condition for either of these blocks ca...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
How to build a model of current transformer for metering?
SimPowerSystems: <http://www.mathworks.com/help/physmod/powersys/ref/saturabletransformer.html> Or something like this fro...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
I want to sort the function x^2+2x+1 new population fuctional output.how i will do it?
optimtool('ga') Give it a try and come back if you have a specific question or error you need help with. <http://www.m...

plus de 12 ans il y a | 0

Réponse apportée
Regarding the Powersysdomain block in SimPowerSystems
As far as I know, the powersysdomain is proprietary and not friendly to tinker with. I have taken three approaches to custom ...

plus de 12 ans il y a | 1

Réponse apportée
How to make a discrete x-y plot with quiver instead of stem
Using quiver() as requested: x= -10:1:10; a= [0,0,0,0,0,0,0,0,0.5,0,0,0,0.5,0,0,0,0,0,0,0,0]; y=zeros(size(x)); v...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
while loop not doing what i want?
Your FF never approaches 1. Perhaps you have an error in your function? <<http://snag.gy/limaH.jpg>>

plus de 12 ans il y a | 0

Réponse apportée
1D plot with exciting colours
I am going to assume you have a 1d vector for time and a 1d vector for voltage. If not, then please answer Doug's comment above...

plus de 12 ans il y a | 0

Réponse apportée
Plotyy changes line style every time in for loop
There are separate 'LineStyle' and 'Marker' settings. 'LineStyle' just changes the Line Property. Valid choices are: {-...

plus de 12 ans il y a | 0

Réponse apportée
How to import text files with unrecognized file extensions
Did you say the Import Wizard is working for you? It has a checkbox that says "Generate MATLAB Code". Does this provide th...

plus de 12 ans il y a | 0

Réponse apportée
xlswrite cell array of strings to vertical array in Excel - goes wrong
Try just 'A2' for range, not 'A2:A11'. xlswrite(['mpSim_results_' fname(1:end-4) '.xlsx'], outputTimes(1:10), 'Sheet1','A2'...

plus de 12 ans il y a | 0

Réponse apportée
How to simulate a model dynamically from m-file?
The "From Workspace" block will take arrays of the form [time value] and step through the values at the time step defined. See ...

plus de 12 ans il y a | 0

Réponse apportée
How to simulate CAN messages without having any external device?
Install the Vector XL drivers and they should provide you with a virtual CAN channel you can use: <http://www.mathworks.com...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Real time simulation of a model designed for arduino without the harware board in the loop?
Make a copy of your model and replace all of the hardware specific blocks from the arduino library (input/output channels, seria...

plus de 12 ans il y a | 0

Réponse apportée
Random numbers with Zero mean (not the basics)
n=100; %number of random numbers you need x=randn(n/2,1); %half random numbers y=[x; -x]; %array of 'random' numbers wit...

plus de 12 ans il y a | 0

Réponse apportée
Conway Game of Life Help
1) neighbors(ii,jj) not neighbors 2) I prefer spy(board) to image(board) 3) You can count nonzero elements with nnz(board)...

plus de 12 ans il y a | 0

Réponse apportée
defining simple optimization constraint: When x1 > 0 then x2 has to equal 0
That is going to be horribly non-linear and drive the solver mad. Wouldn't it be simpler to write it as two separate proble...

plus de 12 ans il y a | 0

Charger plus