Beantwortet

Help with simple nested function

Your code seems to run without errors as demonstrated below, whether it does what you want is another question. What is it exact...

Help with simple nested function

Your code seems to run without errors as demonstrated below, whether it does what you want is another question. What is it exact...

8 Monate vor | 0

Beantwortet

How to quantify non-symmetric signal clipping (clipped differently on positive and negative)?

If, as in your example the nominal (unclipped ) time mean of the signal is zero, then you could quantify the clipping by the sh...

How to quantify non-symmetric signal clipping (clipped differently on positive and negative)?

If, as in your example the nominal (unclipped ) time mean of the signal is zero, then you could quantify the clipping by the sh...

8 Monate vor | 0

Beantwortet

How to plot power law frequency spectrum?

Type, doc loglog on your command line and you will get all of the documentation there for making a loglog plot, can also Googl...

How to plot power law frequency spectrum?

Type, doc loglog on your command line and you will get all of the documentation there for making a loglog plot, can also Googl...

8 Monate vor | 0

Beantwortet

Importing data into a "Matlab function" simulink block and interpolating values

The problem is that the block that provides "data" is a from workspace block rather than a constant. You should replace it with ...

Importing data into a "Matlab function" simulink block and interpolating values

The problem is that the block that provides "data" is a from workspace block rather than a constant. You should replace it with ...

8 Monate vor | 0

| akzeptiert

Beantwortet

Identifying a simulink block

I can't tell what that block is from the tiny screen shot of it you sent, but just right click on the block and select help and ...

Identifying a simulink block

I can't tell what that block is from the tiny screen shot of it you sent, but just right click on the block and select help and ...

8 Monate vor | 0

Beantwortet

Unable to read datetime with format "0600 UTC OCT 25"

t = "1200 UTC OCT 10" td = datetime(t,'InputFormat','hhmm ''UTC'' MMM dd')

Unable to read datetime with format "0600 UTC OCT 25"

t = "1200 UTC OCT 10" td = datetime(t,'InputFormat','hhmm ''UTC'' MMM dd')

8 Monate vor | 0

Beantwortet

Comparing elemental composition with databank

Here is one approach, in which I put the data into tables and then use ismembertol to to do the comparision with a tolerance. I ...

Comparing elemental composition with databank

Here is one approach, in which I put the data into tables and then use ismembertol to to do the comparision with a tolerance. I ...

8 Monate vor | 0

| akzeptiert

Frage

How to avoid recursion in property set functions

I have an application where I would like to perform some additional operations when a property of a handle class is changed. For...

8 Monate vor | 1 Antwort | 0

Beantwortet

Delete Table Rows based of certain characters in a row

I think this is a simple example of what you want to do name = {'cat','dog','fish','bear'}' weight = [3,25,8,300]' T = table(...

Delete Table Rows based of certain characters in a row

I think this is a simple example of what you want to do name = {'cat','dog','fish','bear'}' weight = [3,25,8,300]' T = table(...

8 Monate vor | 0

| akzeptiert

Beantwortet

Error using == Arrays have incompatible sizes for this operation. How solve this error??

The error is telling you that the dimensions of your variable named, area are not equal to the dimensions of the variable called...

Error using == Arrays have incompatible sizes for this operation. How solve this error??

The error is telling you that the dimensions of your variable named, area are not equal to the dimensions of the variable called...

8 Monate vor | 0

Beantwortet

Code shows matrix is singular to working precision. How can I fix it?

Consider your matrix A'A. If you take a column matrix, in your case A' and multiply it by a row, in your case, A, then every co...

Code shows matrix is singular to working precision. How can I fix it?

Consider your matrix A'A. If you take a column matrix, in your case A' and multiply it by a row, in your case, A, then every co...

8 Monate vor | 0

Beantwortet

I need to close excel file before importing data

I looked a little more on MATLAB answers and saw that this issue was previously described, and is a known issue for the Mathwork...

I need to close excel file before importing data

I looked a little more on MATLAB answers and saw that this issue was previously described, and is a known issue for the Mathwork...

8 Monate vor | 0

Beantwortet

Unrecognized function or variable when calling a LinearModel from a Simulink Interpreted Function block

When I make an example following the steps you provide it runs without errors. Please attach your script, and Simulink model. I...

Unrecognized function or variable when calling a LinearModel from a Simulink Interpreted Function block

When I make an example following the steps you provide it runs without errors. Please attach your script, and Simulink model. I...

8 Monate vor | 0

Beantwortet

Average Moving filter in Simulink

You could do it like this using just the discrete transfer function block included with Simulink>Discrete>Discrete Transfer Fcn,...

Average Moving filter in Simulink

You could do it like this using just the discrete transfer function block included with Simulink>Discrete>Discrete Transfer Fcn,...

8 Monate vor | 0

| akzeptiert

Beantwortet

Split data based on column value to write in different sheets in excel

You could do it like this % Parameters filename = "myfile.xlsx" % Example data A = [ 1 45 45 1 34 ...

Split data based on column value to write in different sheets in excel

You could do it like this % Parameters filename = "myfile.xlsx" % Example data A = [ 1 45 45 1 34 ...

9 Monate vor | 1

| akzeptiert

Beantwortet

Collating data from different sources

You could use this approach c1 = { 'A' 'B' 'C' 'D' 1 5 4.1 "a" 2 ...

Collating data from different sources

You could use this approach c1 = { 'A' 'B' 'C' 'D' 1 5 4.1 "a" 2 ...

9 Monate vor | 0

Beantwortet

How to make a humidifier on Simulink

Looking quickly I think these two model humidifiers using Simulink without Simscape. https://huei.engin.umich.edu/wp-content/up...

How to make a humidifier on Simulink

Looking quickly I think these two model humidifiers using Simulink without Simscape. https://huei.engin.umich.edu/wp-content/up...

9 Monate vor | 0

Beantwortet

How to make a random circularly-symmetric gaussian distributed additive noise component with mean 0 and variance (sigma^2)/2?

Using your code and plotting results, qualitatively it looks like you are getting two circularly symmetric distriuted sets of da...

How to make a random circularly-symmetric gaussian distributed additive noise component with mean 0 and variance (sigma^2)/2?

Using your code and plotting results, qualitatively it looks like you are getting two circularly symmetric distriuted sets of da...

9 Monate vor | 1

| akzeptiert

Beantwortet

error setting gram()

It is most likely that the value for t that you are passing to this function is not a scalar. It must be a scalar for [0 t] to b...

error setting gram()

It is most likely that the value for t that you are passing to this function is not a scalar. It must be a scalar for [0 t] to b...

9 Monate vor | 0

Frage

What is a simple way to check if a collection of vectors all have the same number of elements

I am look for a nice simple way to check if a collection of vectors all have the same number of elements. For example this migh...

9 Monate vor | 2 Antworten | 0

Beantwortet

Concatenate two structures from a starting point

I think this example shows how to do what you are asking for % Make some example data d1 = datetime(2023,1,10):days(1):datetim...

Concatenate two structures from a starting point

I think this example shows how to do what you are asking for % Make some example data d1 = datetime(2023,1,10):days(1):datetim...

9 Monate vor | 0

Beantwortet

why am I getting the error "Incorrect number or types of inputs or outputs for function 'step."

This runs for me in R2023b, what version are you running? If I look at the actual step.m file in my directory, which comes up as...

why am I getting the error "Incorrect number or types of inputs or outputs for function 'step."

This runs for me in R2023b, what version are you running? If I look at the actual step.m file in my directory, which comes up as...

9 Monate vor | 0

Beantwortet

Change variables in the base workspace through a Matlab Function block

I would suggest using the "Interpreted MATLAB Function" block for this purpose. It doesn't need to get compiled. It is under Si...

Change variables in the base workspace through a Matlab Function block

I would suggest using the "Interpreted MATLAB Function" block for this purpose. It doesn't need to get compiled. It is under Si...

9 Monate vor | 2

| akzeptiert

Beantwortet

Identifying regions in matrix rows

I wasn't completely clear from your description what output you wanted, but I think this is what you were looking for. Still lo...

Identifying regions in matrix rows

I wasn't completely clear from your description what output you wanted, but I think this is what you were looking for. Still lo...

9 Monate vor | 1

Beantwortet

How to make Simulink read a MatLab variable every 5 seconds?

You can do this using the set_param function. I have attached an example Simulink model and script you can run to demonstrate th...

How to make Simulink read a MatLab variable every 5 seconds?

You can do this using the set_param function. I have attached an example Simulink model and script you can run to demonstrate th...

9 Monate vor | 2

| akzeptiert

Beantwortet

Why does it take MATLAB so long to print hello world?

I'm not sure how you are running your test, running this script inside this online environment seems to indicate it is very f...

Why does it take MATLAB so long to print hello world?

I'm not sure how you are running your test, running this script inside this online environment seems to indicate it is very f...

10 Monate vor | 0

Beantwortet

row ranking among multiple matrices

Similar to @Bruno Luong, but since I already coded up example before I saw @Bruno Luong's I will provide it as alternative here ...

row ranking among multiple matrices

Similar to @Bruno Luong, but since I already coded up example before I saw @Bruno Luong's I will provide it as alternative here ...

10 Monate vor | 1

Beantwortet

How to extract and to export to Excel some variables that have been logged using To Workspace block?

There are many ways to do this. I have attached a simple example showing one way to do it with the data being saved in timeserie...

How to extract and to export to Excel some variables that have been logged using To Workspace block?

There are many ways to do this. I have attached a simple example showing one way to do it with the data being saved in timeserie...

10 Monate vor | 1

| akzeptiert

Beantwortet

"Insufficient number of outputs from right hand side of equal sign to satisfy assignment." in Simulink

I found that if I changed the "Simulate using" parameter on the DUC from Code Generation to Interpreted execution, the model ra...

"Insufficient number of outputs from right hand side of equal sign to satisfy assignment." in Simulink

I found that if I changed the "Simulate using" parameter on the DUC from Code Generation to Interpreted execution, the model ra...

11 Monate vor | 0

Beantwortet

Scatter plot with variable symbol size - it's not linear

According to the documentation for scatter, the size in "points squared" units, try this x = 1:100; y = ones( size(x) ); scat...

Scatter plot with variable symbol size - it's not linear

According to the documentation for scatter, the size in "points squared" units, try this x = 1:100; y = ones( size(x) ); scat...

11 Monate vor | 0

| akzeptiert