解決済み

Remove element(s) from cell array

You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

11ヶ月 前

解決済み

String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

11ヶ月 前

解決済み

Natural numbers in string form

Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

11ヶ月 前

解決済み

Fix the last element of a cell array

Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

11ヶ月 前

解決済み

Cell Counting: How Many Draws?

You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

11ヶ月 前

解決済み

Convert a Cell Array into an Array

Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

11ヶ月 前

解決済み

Split a string into chunks of specified length

Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

11ヶ月 前

解決済み

Convert a numerical matrix into a cell array of strings

Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

11ヶ月 前

解決済み

Create a cell array out of a struct

Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

11ヶ月 前

解決済み

How many Fibonacci numbers?

Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

11ヶ月 前

解決済み

Project Euler: Problem 2, Sum of even Fibonacci

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

11ヶ月 前

解決済み

Number of Even Elements in Fibonacci Sequence

Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

11ヶ月 前

解決済み

Fibonacci-Sum of Squares

Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

11ヶ月 前

質問

Check that point doesnt lay on line in Simulink block diagram

Hello! I want to connect some block programatically. The simplest way for that is to add_line by points but when i add line by ...

11ヶ月 前 | 1 件の回答 | 0

回答済み

Problems with the legend function.

Hello! The simplest way is to define 'DisplayName' parameter for curves. For example: plot(-7.000,f(-7.000),'sq','MarkerSize',...

Problems with the legend function.

Hello! The simplest way is to define 'DisplayName' parameter for curves. For example: plot(-7.000,f(-7.000),'sq','MarkerSize',...

11ヶ月 前 | 0

| 採用済み

解決済み

Find a subset that divides the vector into equal halves

Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

1年以上 前

回答済み

A and B must be floating-point scalars.

Hello, You need to replace i = integral (fun, x, 0, t); to one of variants below: If you want to integrate in x range (from x(...

A and B must be floating-point scalars.

Hello, You need to replace i = integral (fun, x, 0, t); to one of variants below: If you want to integrate in x range (from x(...

1年以上 前 | 0

| 採用済み

質問

Can I mark block as 'algebraic loop breaker'?

Hello, I create block which implement time shift in signal for some steps but Simulink decides that there is algebraic loop wit...

1年以上 前 | 0 件の回答 | 0

回答済み

Insert number in polynomial

Hello, You need to replace f= @(x)p; by f = symfun(p,x);.

Insert number in polynomial

Hello, You need to replace f= @(x)p; by f = symfun(p,x);.

2年弱 前 | 0

質問

Using complex structure in simulink constant block

Hello, I know that there is way to pass structure to simulink model as bus object but what should I do if i need to pass comple...

2年弱 前 | 1 件の回答 | 0

質問

Force output for function with no output

Hello! I am working with function handles and get error because function does not return anything. Can I force any function to ...

約2年 前 | 1 件の回答 | 0

質問

Run VBA code in MS Office through COM

Hello, I need to take some data from program through COM but that program does not working with Matlab correctly. However tha...

2年以上 前 | 0 件の回答 | 0

回答済み

How i can call matlab basic function if that name is accotiated with couple of functions?

The simplest way to do that is use that code: varargout = builtin('diff',varargin{:}); Also you can looking for somethin...

How i can call matlab basic function if that name is accotiated with couple of functions?

The simplest way to do that is use that code: varargout = builtin('diff',varargin{:}); Also you can looking for somethin...

約3年 前 | 0

| 採用済み

質問

How i can call matlab basic function if that name is accotiated with couple of functions?

Hello, I need to call function |diff| (differences between array elements) for array of symbolic variable but matlab is using...

約3年 前 | 2 件の回答 | 0

回答済み

How to solve det(s^2*M+s*C(s)+K)=0 for s as fast as posible

You can try to use that code from <https://www.mathworks.com/matlabcentral/fileexchange/67052-matlab-scripts there>: A=Ga...

How to solve det(s^2*M+s*C(s)+K)=0 for s as fast as posible

You can try to use that code from <https://www.mathworks.com/matlabcentral/fileexchange/67052-matlab-scripts there>: A=Ga...

3年以上 前 | 0

解決済み

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

3年以上 前

回答済み

Help reducing memory usage during large matrix multiplication

I think that problem can be solved by the manual multiplication of matrices. %note: V2=(V2-I*C) is the same V2(172)=V2(172)...

Help reducing memory usage during large matrix multiplication

I think that problem can be solved by the manual multiplication of matrices. %note: V2=(V2-I*C) is the same V2(172)=V2(172)...

3年以上 前 | 0

回答済み

How I can fix this "Signal Dimension" error message ?

You may use |Simulink/Signal Attributes/Signal Specification block|. Specify number of dimensions like that is shown on the pict...

How I can fix this "Signal Dimension" error message ?

You may use |Simulink/Signal Attributes/Signal Specification block|. Specify number of dimensions like that is shown on the pict...

3年以上 前 | 1

解決済み

Model a mass spring system

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

3年以上 前

解決済み

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

3年以上 前