답변 있음
Modifying discrete filter block simulink
Hi Adam, If you're trying to modify the sample time from the command prompt, this api might be helpful: >> load_system('...

대략 9년 전 | 0

| 수락됨

답변 있음
List of structures as input to getfield()?
First Argument of 'getfield' should be a struct. `myStructList(i).name` probably refers to a char type variable. If myStruct...

대략 9년 전 | 0

답변 있음
For-loop in Matlab
You don't even need a for loop c = 1:10; x = sind(c);

대략 9년 전 | 1

문제를 풀었습니다


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

대략 9년 전

문제를 풀었습니다


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

대략 9년 전

문제를 풀었습니다


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

대략 9년 전

문제를 풀었습니다


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

대략 9년 전

문제를 풀었습니다


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

대략 9년 전

문제를 풀었습니다


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

대략 9년 전

문제를 풀었습니다


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

대략 9년 전

답변 있음
double for loop with changing start point at second loop. need help, wrong output.
n = 10; result = zeros(n,n-1); for N1=1:1:(n-1) for N2=(N1+1):1:n result(N2,N1) = N2+N1; end ...

대략 9년 전 | 0

| 수락됨

답변 있음
How can I find duplicate sub systems in model using m-script
This below code should work for reasonably simple subsystems. I haven't tried for any complex ones - like with triggered input. ...

대략 9년 전 | 0

| 수락됨

답변 있음
M script: How to find which block is connected to which block?
>> load_system(myModel); >> allBlks = find_system(myModel, 'Type', 'block') Now this will give you all the blocks in the...

대략 9년 전 | 3

| 수락됨

답변 있음
find a row with a column value don't remove duplicated cells
for j=1, it is trying to access data1{0,1} but matlab indexing starts from 1.

대략 9년 전 | 0

| 수락됨

문제를 풀었습니다


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

대략 9년 전

문제를 풀었습니다


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

대략 9년 전

문제를 풀었습니다


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

대략 9년 전

답변 있음
Creating a surface plot using Simulink?
Hi Vokler, if you already have designed the simulink model, you could simply use load_system and sim to get the output.

대략 9년 전 | 0

답변 있음
Hello, i need the values in simulink..
From what I understand, you are trying to save the output of the simulation in an excel file, in place of viewing in the scope. ...

대략 9년 전 | 0

답변 있음
About fixing a script
You have an error in 'mat2cell' function call in line 45 of your script. Please see the documentation to get more information on...

대략 9년 전 | 0

| 수락됨

답변 있음
creating a new vector relative to the matrix
% A = your 10x6 original matrix; uRows = unique(A, 'rows'); result = zeros(6,1); for i=1:size(uRows, 1) ...

대략 9년 전 | 0

| 수락됨

답변 있음
Singleton for database connection: availability problem
I became intrigued and scribbled something on my own. I guess you already know this stuff: classdef (Sealed) MyDBConnection...

대략 9년 전 | 0

답변 있음
replace the string a cell array with empty cell
You may directly use the strrep function a = strrep(a, 'def', '');

대략 9년 전 | 0

| 수락됨

답변 있음
matrix with elements sum of elements of old matrix
This would work, but maybe there's a better solution. a = [3 4 2 5]; a_new = a(1:end-1); a_new(end) = a_new(end) + a(...

대략 9년 전 | 1

문제를 풀었습니다


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

대략 9년 전

문제를 풀었습니다


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

대략 9년 전

문제를 풀었습니다


Add two numbers
Given a and b, return the sum a+b in c.

대략 9년 전

문제를 풀었습니다


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

대략 9년 전

답변 있음
pls i need ful information and steps on how to use matlab to plot sin wave curve
You could find an example in the matlab documentation for plot function. >> doc plot

대략 9년 전 | 0

더 보기