Risolto


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

circa 13 anni fa

Risolto


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

circa 13 anni fa

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

circa 13 anni fa | 0

| accettato

Risolto


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

circa 13 anni fa

Risolto


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

circa 13 anni fa

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

circa 13 anni fa | 0

| accettato

Risolto


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

circa 13 anni fa

Risolto


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

circa 13 anni fa

Risolto


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

circa 13 anni fa

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

circa 13 anni fa | 0

Risolto


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

circa 13 anni fa

Risolto


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

circa 13 anni fa

Risolto


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

circa 13 anni fa

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

circa 13 anni fa | 0

| accettato

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

circa 13 anni fa | 1

| accettato

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

circa 13 anni fa | 0

| accettato

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

circa 13 anni fa | 0

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

circa 13 anni fa | 1

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

circa 13 anni fa | 0

| accettato

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

| accettato

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

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

circa 13 anni fa | 0

Carica altro