Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

ongeveer 9 jaar ago

Solved

Weighted average

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

ongeveer 9 jaar ago

Solved

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

ongeveer 9 jaar ago

Solved

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

ongeveer 9 jaar ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

ongeveer 9 jaar ago

Answered

how to find average values of answers

b=zeros(1,5) for a=1:5 b(a)=2*a+1; end k=mean(b);

how to find average values of answers

b=zeros(1,5) for a=1:5 b(a)=2*a+1; end k=mean(b);

ongeveer 9 jaar ago | 0

| accepted

Answered

hi, i need to save my for loop array result in cell array,i attached my code,please correct the mistake which i did

OK. i have tried with cc as random generated matrix of size 192*192 I could able to generate the cell array of 1*384 with your ...

hi, i need to save my for loop array result in cell array,i attached my code,please correct the mistake which i did

OK. i have tried with cc as random generated matrix of size 192*192 I could able to generate the cell array of 1*384 with your ...

ongeveer 9 jaar ago | 0

Answered

Problem Implementing a sine wave with increasing frequency

The problem with your model is dynamic freqency change faster than the generation of sine wave itself. Say for example, at a g...

Problem Implementing a sine wave with increasing frequency

The problem with your model is dynamic freqency change faster than the generation of sine wave itself. Say for example, at a g...

ongeveer 9 jaar ago | 0

| accepted

Answered

How could i generate 10000 samples of a random variable uniformly distributred in(0,1)??

In your code,loop should start form 1. i=1:1:1000 However inorder to acheieve what you have wanted, you may not need a loop. ...

How could i generate 10000 samples of a random variable uniformly distributred in(0,1)??

In your code,loop should start form 1. i=1:1:1000 However inorder to acheieve what you have wanted, you may not need a loop. ...

ongeveer 9 jaar ago | 0

Answered

how to read a file in matrix format?

fid=fopen('11_20114111611_logfile.txt','r') k=textscan(fid,'%d%d%d%d') cell2mat (k)

how to read a file in matrix format?

fid=fopen('11_20114111611_logfile.txt','r') k=textscan(fid,'%d%d%d%d') cell2mat (k)

ongeveer 9 jaar ago | 1

| accepted

Answered

Making Pulse sequence with if commands in Embeded MATLAB Function in simulink

When U1 is between u4 and u5, y=u5-u4=0.065-0.035 That is why you have 0.03 magnitude at your output

Making Pulse sequence with if commands in Embeded MATLAB Function in simulink

When U1 is between u4 and u5, y=u5-u4=0.065-0.035 That is why you have 0.03 magnitude at your output

ongeveer 9 jaar ago | 0

| accepted

Answered

Need help modifying a piece of code that allows the user to draw lines

If you want to see {0,0} before the mouse click, use this code function draw_lines % Click the left mouse button to ...

Need help modifying a piece of code that allows the user to draw lines

If you want to see {0,0} before the mouse click, use this code function draw_lines % Click the left mouse button to ...

ongeveer 9 jaar ago | 0

| accepted

Answered

Need help modifying a piece of code that allows the user to draw lines

Assign a flag for the first click and reset it afterwards. Use the flag to set the coordinates to {0,0}. Hope this is what you...

Need help modifying a piece of code that allows the user to draw lines

Assign a flag for the first click and reset it afterwards. Use the flag to set the coordinates to {0,0}. Hope this is what you...

ongeveer 9 jaar ago | 0

Answered

Calculating values from an iterative map

for the second part, s=0; for n=4:8 k=(x(n-1)-2)+(x(n-1)+1); s=s+k; end disp(s)

Calculating values from an iterative map

for the second part, s=0; for n=4:8 k=(x(n-1)-2)+(x(n-1)+1); s=s+k; end disp(s)

ongeveer 9 jaar ago | 0

Question

Deploying stand alone applications

Hello Every One, I have been trying to make a stand alone application (which should run on a pc without MATLAB) I have generat...

ongeveer 9 jaar ago | 0 answers | 0

Answered

insert textbox in a geoshow plot

text(0.5,0.5,'data') will display data string according to 0.5 nd 0.5

insert textbox in a geoshow plot

text(0.5,0.5,'data') will display data string according to 0.5 nd 0.5

meer dan 9 jaar ago | 0

Answered

PID working with sine wave as reference

PI is a common controller normally used in power electroincs for both DC-DC and DC-AC conversions. We have few systems running w...

PID working with sine wave as reference

PI is a common controller normally used in power electroincs for both DC-DC and DC-AC conversions. We have few systems running w...

meer dan 9 jaar ago | 0

Answered

Data type conversion for mod operation result.

c=int16(mod(200,3)) will generate c as 16 bit integer class c=int8(mod(200,3)) ...

Data type conversion for mod operation result.

c=int16(mod(200,3)) will generate c as 16 bit integer class c=int8(mod(200,3)) ...

meer dan 9 jaar ago | 0

Answered

How to set the default version of Matlab between two versions?

If you are using MS Windows, then: http://www.mathworks.com/matlabcentral/answers/44849

How to set the default version of Matlab between two versions?

If you are using MS Windows, then: http://www.mathworks.com/matlabcentral/answers/44849

meer dan 9 jaar ago | 2

| accepted

Answered

convert plot(x,y) to plot(y(ind))

g=interp1(y,x,0.5) g gives you the x value corresponding to the given y value (0.5). Use a for loop to find out the enti...

convert plot(x,y) to plot(y(ind))

g=interp1(y,x,0.5) g gives you the x value corresponding to the given y value (0.5). Use a for loop to find out the enti...

meer dan 9 jaar ago | 0

Answered

Is there any setting in simulink to operate floating by integer ?

You can use convert block <</matlabcentral/answers/uploaded_files/32998/conv.png>>

Is there any setting in simulink to operate floating by integer ?

You can use convert block <</matlabcentral/answers/uploaded_files/32998/conv.png>>

meer dan 9 jaar ago | 0

Answered

Smooth step changes in simulink

using a low pass filter should produce the result you wanted.. << <</matlabcentral/answers/uploaded_files/32987/step.jpg...

Smooth step changes in simulink

using a low pass filter should produce the result you wanted.. << <</matlabcentral/answers/uploaded_files/32987/step.jpg...

meer dan 9 jaar ago | 0

| accepted

Answered

How to get unity power factor in three phase rectifier by hysteresis current controller

Steps: 1) Sample the input line voltage signal. Use a PLL for syncronization, the output of which is a unit mag sinusoidal sign...

How to get unity power factor in three phase rectifier by hysteresis current controller

Steps: 1) Sample the input line voltage signal. Use a PLL for syncronization, the output of which is a unit mag sinusoidal sign...

meer dan 9 jaar ago | 0

Answered

How do I make a for loop for summing up to specified integer

clc k=input('Enter no'); sum=0; for n=1:k sum=sum+n; end disp(sum)

How do I make a for loop for summing up to specified integer

clc k=input('Enter no'); sum=0; for n=1:k sum=sum+n; end disp(sum)

meer dan 9 jaar ago | 0

Question

Using version deatils of the tool box in application

HELLO ALL, Iam developing an application for code generation later. I would like to test the version of tool boxes required fo...

meer dan 9 jaar ago | 1 answer | 0

Answered

how i can get the first and second letters in cell data

for k=1:4 f(k)=letters{k}(1); end for k=1:4 g(k)=letters{k}(2); end

how i can get the first and second letters in cell data

for k=1:4 f(k)=letters{k}(1); end for k=1:4 g(k)=letters{k}(2); end

meer dan 9 jaar ago | 1

Answered

how do i present the variable W with the 2 digits after the decimal point?

format bank w

how do i present the variable W with the 2 digits after the decimal point?

format bank w

meer dan 9 jaar ago | 0

Answered

How can I get the interpolated value of and array

c= fit([1; 2; 3 ;4],[10 ;20; 30; 40],'poly2')

How can I get the interpolated value of and array

c= fit([1; 2; 3 ;4],[10 ;20; 30; 40],'poly2')

meer dan 9 jaar ago | 0

Answered

How do I design a for-loop to sample 3 seconds of a signal every 15 seconds?

f= rand(6); f=f(:); k=1; for i=1:1:length(f) if (mod(i,15)<3) b(k)=f(i); k=k+1; e...

How do I design a for-loop to sample 3 seconds of a signal every 15 seconds?

f= rand(6); f=f(:); k=1; for i=1:1:length(f) if (mod(i,15)<3) b(k)=f(i); k=k+1; e...

meer dan 9 jaar ago | 0

Answered

DC/DC and DC/AC PWM Converters result problem

Yeah i do agree with your analysis. There is a mis understanding of the PWM pulse generation. In the model the carrier wave is...

DC/DC and DC/AC PWM Converters result problem

Yeah i do agree with your analysis. There is a mis understanding of the PWM pulse generation. In the model the carrier wave is...

meer dan 9 jaar ago | 0