Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

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

más de 12 años hace | 0

| aceptada

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Respondida
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?

más de 12 años hace | 0

| aceptada

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

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

más de 12 años hace | 0

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

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

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 1

| aceptada

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

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

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

más de 12 años hace | 1

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

más de 12 años hace | 0

| aceptada

Respondida
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>>

más de 12 años hace | 0

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

más de 12 años hace | 0

Respondida
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: {-...

más de 12 años hace | 0

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

más de 12 años hace | 0

Respondida
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'...

más de 12 años hace | 0

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

más de 12 años hace | 0

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

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

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

más de 12 años hace | 0

Respondida
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)...

más de 12 años hace | 0

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

más de 12 años hace | 0

Cargar más