Community Profile

C.J. Harris


214 total contributions since 2011

Contact

C.J. Harris's Badges

Contributions in
View by

Answered
How can I change tunable parameters in generated C++ class from private to public?
If you set parameter member visibility option to 'public' this will move the tunable parameters structure from private to public...

11 months ago | 0

| accepted

Answered
I am unable to identify the two simulink blocks that are shown in the snapshot of a Control System Simulink Model.
The first block is the 'Display' block. See <http://mathworks.com/help/simulink/slref/display.html> The second block is the '...

11 months ago | 0

Answered
how to retrieve the Simulink execution order from the workspace
As far as I know there isn't really an easy way to do this (i.e. using get_param or similar). Instead you have to debug your mod...

11 months ago | 0

| accepted

Answered
HELP PLEASE!! How do I print matlab "1:5 multiply increases each line"
Do you mean like this? clc fprintf(' SGD USD GBP EURO \n') for x= 1 : 5 USD = 0.69 * 2 * x; GBP = 0...

11 months ago | 1

Answered
In Matlab r2010b, how to find that string contains japanese character?
Depends on what you define as Japanese. The Hiragana characters have an Unicode range from 12352-12447, while the Katagana chara...

11 months ago | 1

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

11 months ago

Answered
Letter refer to number
Nr2 = double(Letter)-'A'+1

11 months ago | 0

| accepted

Answered
how to create a data buffer in simulink
I believe the _Tapped Delay_ block should do what you are requesting. You can find this block in the Simulink Library Browser un...

11 months ago | 0

| accepted

Answered
Summing different set of arrays.
nYear = 2002; nValue = 14; x = [7 10 2001 24 10 5 1 7 10 2001 14 15 2 1 7 10 2001 14 13 2 9 ...

1 year ago | 0

| accepted

Answered
how to convert model from continuous state space with disturbance to discrete
% Create state space model sys = ss(A,B,C,D); % Convert to discrete, where dt is your discrete time-step (in seconds...

1 year ago | 0

Answered
Cutting a certain pattern from an array
A = [1 2 3 4 5 6 0 0 0 0 1 2 3 4 5 6 7 8 9 10 0 0 0 0]; B = [0 0 0 0]; C = A(setxor(cell2mat(arrayfun(@(x)(x:x+lengt...

1 year ago | 1

| accepted

Answered
How to implement the counter (really simple)?
Infeasibles = any((A<=0) | (B>100),2);

1 year ago | 0

Answered
Why does char give me an empty output?
This is because ASCII characters 1 to 7 are not visible characters. See the 'Dec' column: <http://www.asciitable.com/>

1 year ago | 1

Answered
How to select a value in filter dropdown in excel
You might find it a lot easier to just write this specific functionality as an Excel macro, and then invoking the macro from MA...

2 years ago | 1

Answered
i want to change the value in some specific rows how can i do it
A = [1 2 3; 1 2 3; 1 2 3; 1 2 3; 1 2 3; 1 2 3] % Change Row 2 A(2,:) = [9 8 7]; % Change Row 5 A(5,:) = [5 5 ...

2 years ago | 0

Answered
Why can I not get the modaldlg function to work? eg. user_response = modaldlg('Title','Confirm Close');
Try one of the following, depending on the type of dialog you want: user_response = errordlg('Error','Confirm Close', 'moda...

2 years ago | 0

| accepted

Answered
remove first s and last t rows of a matrix containing NaN, leave lows in the middle containing NaN.
Nobody should ever need more than one line: A = [[NaN;NaN;NaN;4;1;NaN;5;6;8;NaN;NaN],[NaN;NaN;2;7;6;5;NaN;6;18;2;NaN]]; ...

2 years ago | 0

Answered
using add_block in a for loop
I see you have defined a source block ('NPC_MMC_Library/Submodule'), however your destination doesn't appear to include the mode...

2 years ago | 0

| accepted

Answered
Vehicle dynamics model simulink
1. Make sure all your inport are connected to a source (signal generator, constant, etc). 2. Make sure all your outports are ...

2 years ago | 0

| accepted

Answered
Select elements of Matrix?
Like so: P = magic(20); Q = P(end-17:end,end-17:end); Or this, as I assume you mean rows/columns 3 to 20 - otherwise...

2 years ago | 0

Answered
How can I find the max of two vectors?
Do you actually want to sort by sum of columns? For example: a = [4.84 3.55 2.09 4.20 1.14 5.15 2.45 3.41 1.66 2.75 3.8...

2 years ago | 1

| accepted

Answered
Delete rows that have the first same value and keep one row in matrix with 2 colums?
Do you mean something like this? x = [0,0 ; 250,1050 ; 250,1051 ; 1173,3050 ; 1173 3150]; [~,idx] = unique(x(:,1)); ...

2 years ago | 0

Answered
how do i fix "inner matrix dimensions must agree" in this formula?
Some of your defined vectors are of a fixes size, for example: rad=(0:0.01:0.15); theta=(0:24:360); Therefore your ...

2 years ago | 0

| accepted

Answered
Recreating the debouncer example in Simulink
You can use integrators as counters. Check for your desired state (TRUE or FALSE), then convert this TRUE signal into a double/s...

2 years ago | 1

| accepted

Solved


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

2 years ago

Solved


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

2 years ago

Answered
Error with mvnrnd function?
The function *mvnrnd* is part of the statistics toolbox. Firstly, in order to use this function you have to have the Statistics ...

2 years ago | 0

| accepted

Answered
Timer to send a new message?
I would probably use a resettable integrator for this task. Feed the integrator a constant value of '1', that way it will act as...

2 years ago | 1

| accepted

Answered
Insert Values of a Matrix from row 2 using XLSWRITE
A = ones(5,20); xlswrite('Workbook.xls',A,'Sheet1','A2')

2 years ago | 0

| accepted

Load more