Solved

Counting pulses in a signal

Count the number of pulses that are the result of summing each pulse generator block. Pulse Generator blocks produce a recurr...

ungefär 8 år ago

Solved

Add damping to a mass spring system

Model an ideal mass-spring-damper system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/im...

ungefär 8 år ago

Solved

Make a full wave rectifier

Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

ungefär 8 år ago

Solved

Make a half wave rectifier

Produce a signal that outputs the given sine wave source when it is greater than zero and outputs zero when it is less than zero...

ungefär 8 år ago

Solved

Add a block to a model

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

ungefär 8 år ago

Solved

Produce a sine wave

Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

ungefär 8 år ago

Solved

Add offset to a signal

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

ungefär 8 år ago

Solved

Produce a cosine wave

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

ungefär 8 år ago

Solved

Connect blocks in a model

Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

ungefär 8 år ago

Answered

Batch runs- Matlab busy

If you call the batch file with "&", the job will be launched in a different shell and it will free matlab prompt immediately. ...

Batch runs- Matlab busy

If you call the batch file with "&", the job will be launched in a different shell and it will free matlab prompt immediately. ...

ungefär 8 år ago | 0

| accepted

Answered

Data import from excel

You could read the entire spreadsheet as cells, like this - >> [~,~,rawData] = xlsread('mySpreadSheet.xls');

Data import from excel

You could read the entire spreadsheet as cells, like this - >> [~,~,rawData] = xlsread('mySpreadSheet.xls');

ungefär 8 år ago | 1

Answered

Modify the following program in order to get rid of the break statement without affecting the behavior of the program

Hi Taylie, I am not sure why you want the 'break' to be removed. However, the following code works - but NOT an elegant way o...

Modify the following program in order to get rid of the break statement without affecting the behavior of the program

Hi Taylie, I am not sure why you want the 'break' to be removed. However, the following code works - but NOT an elegant way o...

ungefär 8 år ago | 0

| accepted

Answered

Code of Exponential Discontinuous Function

Does this give the desired plot? Dd = 50; Td = 3600; A1 = 74.6; alpha1 = 2.43*(10^(-3)); A2 = 2.49; alpha2 =...

Code of Exponential Discontinuous Function

Does this give the desired plot? Dd = 50; Td = 3600; A1 = 74.6; alpha1 = 2.43*(10^(-3)); A2 = 2.49; alpha2 =...

mer än 8 år ago | 0

Answered

Create a Message Box with a condition

x = 5:25; % Input Vector limit = 10; if ~isempty(find(x<limit,1)) msgbox('Fault'); else % Do Something Else...

Create a Message Box with a condition

x = 5:25; % Input Vector limit = 10; if ~isempty(find(x<limit,1)) msgbox('Fault'); else % Do Something Else...

mer än 8 år ago | 0

Answered

Having issues with understanding the formatting of an error message.

Hey Justin, [] is used for horizontal concatenation of arrays. Texts inside ' ' are treated as character arrays and the numb...

Having issues with understanding the formatting of an error message.

Hey Justin, [] is used for horizontal concatenation of arrays. Texts inside ' ' are treated as character arrays and the numb...

mer än 8 år ago | 0

Answered

i wanted to plot histogram for following

% Need to convert the input as a cell-array >> status = {'dosing', 'dosing', 'dosing', 'initializing',... '...

i wanted to plot histogram for following

% Need to convert the input as a cell-array >> status = {'dosing', 'dosing', 'dosing', 'initializing',... '...

mer än 8 år ago | 0

| accepted

Answered

Simple Array Calculation Help

>> inputArray = [S R R R S S S R S R S S R R R R R S S S S S S R S S S R R S ]; >> result = (nonzeros((diff([0 (find(inputA...

Simple Array Calculation Help

>> inputArray = [S R R R S S S R S R S S R R R R R S S S S S S R S S S R R S ]; >> result = (nonzeros((diff([0 (find(inputA...

mer än 8 år ago | 0

Answered

Error when function changes cell array size

You ought to be using curly brackets for indexing here. function args = updateCell(args, string, value) if isempty(...

Error when function changes cell array size

You ought to be using curly brackets for indexing here. function args = updateCell(args, string, value) if isempty(...

mer än 8 år ago | 0

Answered

Converting function file to Anonomys function.

fH = str2func('lorenz'); y = feval(fH,t,x,sigma,rho,beta);

Converting function file to Anonomys function.

fH = str2func('lorenz'); y = feval(fH,t,x,sigma,rho,beta);

mer än 8 år ago | 0

Answered

How to access workspace variables one by one using m-script

You can get all the workspace variables like this: >> varList = evalin('base', 'who'); Then check individual parameters:...

How to access workspace variables one by one using m-script

You can get all the workspace variables like this: >> varList = evalin('base', 'who'); Then check individual parameters:...

mer än 8 år ago | 0

| accepted

Answered

flag an error message when a scalar is complex

if ~isreal(num) error('This is a complex number.') end

flag an error message when a scalar is complex

if ~isreal(num) error('This is a complex number.') end

mer än 8 år ago | 0

| accepted

Answered

Problem in nested function

Looks like, you haven't closed all of your function definition with an 'end'. function [ resobj ] = plot4Paper(data_choice...

Problem in nested function

Looks like, you haven't closed all of your function definition with an 'end'. function [ resobj ] = plot4Paper(data_choice...

mer än 8 år ago | 0

| accepted

Answered

Set Data Type of Inport Block

You can double click on the block and change the following values: <</matlabcentral/answers/uploaded_files/31765/Inport.PNG...

Set Data Type of Inport Block

You can double click on the block and change the following values: <</matlabcentral/answers/uploaded_files/31765/Inport.PNG...

mer än 8 år ago | 0

Answered

Need help on my for loop

Isn't there a mix-up between 'i' and 'k' index? Also, you could use 'hold on' before starting the loop and avoid the conditio...

Need help on my for loop

Isn't there a mix-up between 'i' and 'k' index? Also, you could use 'hold on' before starting the loop and avoid the conditio...

mer än 8 år ago | 0

Answered

State space without using the control toolbox - Error using + Matrix dimensions must agree.

In this line, x(:,k) = x(:,k-1) + dt*(A*x(k-1) + B*u(k-1)); % Error The term A*x(k-1) would give you a 2x2 matrix. You ...

State space without using the control toolbox - Error using + Matrix dimensions must agree.

In this line, x(:,k) = x(:,k-1) + dt*(A*x(k-1) + B*u(k-1)); % Error The term A*x(k-1) would give you a 2x2 matrix. You ...

mer än 8 år ago | 0

Answered

How can I select a .m file through browser push button option in GUI and add/save that file in my current Matlab working directory ? Any guidance is appreciated.TIA

[file,path] = uigetfile('*.m','Choose file to save'); copyfile([path file], pwd)

How can I select a .m file through browser push button option in GUI and add/save that file in my current Matlab working directory ? Any guidance is appreciated.TIA

[file,path] = uigetfile('*.m','Choose file to save'); copyfile([path file], pwd)

mer än 8 år ago | 0

| accepted

Answered

Connect two blocks in a subsytem

Hi Nedra, I couldn't load the image you have attached. You could give this a try: add_line('Mtest/Subsystem', 'Logical O...

Connect two blocks in a subsytem

Hi Nedra, I couldn't load the image you have attached. You could give this a try: add_line('Mtest/Subsystem', 'Logical O...

mer än 8 år ago | 0

Answered

Need help to create matlab script to convert currency

Here is function for it : you can easily convert to a script if you want. function currencyTable = convertCurrency(toUsd, t...

Need help to create matlab script to convert currency

Here is function for it : you can easily convert to a script if you want. function currencyTable = convertCurrency(toUsd, t...

mer än 8 år ago | 0

Answered

how to find differences in two simulink configuration settings using m-script

You can return a variable if you run the function 'active_config' after you have saved it as mentioned in the question. >> ...

how to find differences in two simulink configuration settings using m-script

You can return a variable if you run the function 'active_config' after you have saved it as mentioned in the question. >> ...

mer än 8 år ago | 0

| accepted