Gelöst


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

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

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

mehr als 12 Jahre vor | 0

| akzeptiert

Gelöst


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

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

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

mehr als 12 Jahre vor | 0

| akzeptiert

Gelöst


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

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

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

mehr als 12 Jahre vor | 0

Gelöst


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

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

Gelöst


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

mehr als 12 Jahre vor

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

Mehr laden