Solved

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

oltre 2 anni ago

Solved

Energy of a photon

*⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛* Given the frequency F of a photon in giga hertz. Find energy E of this...

oltre 2 anni ago

Solved

Pernicious Anniversary Problem

Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

oltre 2 anni ago

Solved

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

circa 3 anni 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...

circa 3 anni ago

Solved

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

circa 3 anni ago

Solved

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

circa 3 anni ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

circa 3 anni ago

Solved

Find the dimensions of a matrix

Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

circa 3 anni 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:...

circa 3 anni ago

Solved

Determine if input is odd

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

circa 3 anni 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...

circa 3 anni 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 ...

oltre 5 anni ago

Question

Global variables in embedded Matlab function

Hi @ all, I would like to use some variables defined in a m-file into embedded Matlab block in Simulink. I would like to do t...

circa 7 anni ago | 1 answer | 0

Answered

create Executable file from simulink model

How I can do this? Maybe in the first question I have not been clear Let me shown a simple example : I have a simulink ...

create Executable file from simulink model

How I can do this? Maybe in the first question I have not been clear Let me shown a simple example : I have a simulink ...

circa 7 anni ago | 1

Question

create Executable file from simulink model

Hi @ all, I would like to ask you how I can build a model , using the Simulink Coder. I would like to call the so generated ...

circa 7 anni ago | 3 answers | 1

Answered

matlab simulink error help me

Hi, You use a for statement but I cant see no one indexed variable inside the loop. Maybe you would like to to this : nu...

matlab simulink error help me

Hi, You use a for statement but I cant see no one indexed variable inside the loop. Maybe you would like to to this : nu...

circa 7 anni ago | 0

Answered

Extracting data from .mat file

Sorry i dont understand well your question to extract the data you can try to use getEntry, documentation are reported in the...

Extracting data from .mat file

Sorry i dont understand well your question to extract the data you can try to use getEntry, documentation are reported in the...

oltre 7 anni ago | 0

| accepted

Answered

mean and standard deviation code

Hi, From your post i suppose that you would like the mean rows by rows, and you want the standard deviation columns by column...

mean and standard deviation code

Hi, From your post i suppose that you would like the mean rows by rows, and you want the standard deviation columns by column...

oltre 7 anni ago | 0

Answered

Extracting data from .mat file

Hi, You can use the reshape function. Example : data=rand(8760,1) B = reshape(data,24,365); B=B'; Regards M...

Extracting data from .mat file

Hi, You can use the reshape function. Example : data=rand(8760,1) B = reshape(data,24,365); B=B'; Regards M...

oltre 7 anni ago | 0

Answered

I have a problem with plotting a summation equation

Hi, you mean something like that ? y=0:0.025:1; x=0:0.05:0.7; n=1:1:50; [X,Y]=meshgrid(x,y); for i=1:size(n,2) ...

I have a problem with plotting a summation equation

Hi, you mean something like that ? y=0:0.025:1; x=0:0.05:0.7; n=1:1:50; [X,Y]=meshgrid(x,y); for i=1:size(n,2) ...

oltre 7 anni ago | 1

| accepted

Question

Fully standalone executable file

Hi @ all, I'm not an expert in compiler. I would like to ask if someone tried to create, starting from matlab m file, a compl...

oltre 7 anni ago | 3 answers | 0

Question

Import data in Simulink

Hi I would like to import in Simulink about 30 variables (with constant value) declared in .m file and the use these in one ...

oltre 7 anni ago | 1 answer | 0

Question

Simulink Multiplot graph

Hi @ all, I would like to ask if someone can explain me how I can add labels and titles in the simulink block multi graphplot...

circa 8 anni ago | 1 answer | 0

Answered

equation with multiple X

Hi If you want the division element by element you must put the dot in the right position: y = ((x*20000)./(x+20000))/...

equation with multiple X

Hi If you want the division element by element you must put the dot in the right position: y = ((x*20000)./(x+20000))/...

oltre 8 anni ago | 1

| accepted

Answered

operations on specific row

Hi, for your first question you can use : p = polyfit(A(:,3),A(:,2),1); Pay attention to use one like degree . For the sec...

operations on specific row

Hi, for your first question you can use : p = polyfit(A(:,3),A(:,2),1); Pay attention to use one like degree . For the sec...

oltre 8 anni ago | 0

| accepted

Question

Ode option

Hi at all, I would like to ask you if there is a way,using standard matlab ode function, to stop the calculation before the f...

oltre 8 anni ago | 1 answer | 0

Question

Simulink model in a for loop

Hi at all, I have a problem when I run a simulink model inside a for loop. More in detail when I run the model with the comm...

oltre 8 anni ago | 1 answer | 0

Answered

legend

Try * if b is a numerical vector with: legend(num2str(b(:))) * If b is a string vector : legend(b)

legend

Try * if b is a numerical vector with: legend(num2str(b(:))) * If b is a string vector : legend(b)

oltre 8 anni ago | 0

| accepted