답변 있음

Undefined function or variable 'para'.

This error message means that you are trying to assign the variable beta1(i) to a variable para(i,1) that you have not defined y...

Undefined function or variable 'para'.

This error message means that you are trying to assign the variable beta1(i) to a variable para(i,1) that you have not defined y...

3달 전 | 0

답변 있음

Plotting in a Loop Always Return "Vector must be the same length"

Since r is not preallocated to a 2 by 8 matrix it gets built up as it goes. The first time through your loop when you assign r(...

Plotting in a Loop Always Return "Vector must be the same length"

Since r is not preallocated to a 2 by 8 matrix it gets built up as it goes. The first time through your loop when you assign r(...

4달 전 | 0

답변 있음

how to solve ?Error using/Matrix dimensions must agree.'?

Try replacing the line assigning x2 with the following using ./ to get element by element division y2 = K./(exp((K*x-K*C2))-b);...

how to solve ?Error using/Matrix dimensions must agree.'?

Try replacing the line assigning x2 with the following using ./ to get element by element division y2 = K./(exp((K*x-K*C2))-b);...

4달 전 | 1

| 수락됨

답변 있음

Can someone explain me how to make this loop efficiently?

I think the key is coming up with an expression that gives you the index for someArray from the current loop index. Something li...

Can someone explain me how to make this loop efficiently?

I think the key is coming up with an expression that gives you the index for someArray from the current loop index. Something li...

4달 전 | 1

| 수락됨

답변 있음

Conditioning a matrix for loop

You can do this without a loop, for example out = [A(:,1:4)-b(:,1) A(:,5:8)-b(:,2) A(:,9:12)-b(:,3)] out = out - c

Conditioning a matrix for loop

You can do this without a loop, for example out = [A(:,1:4)-b(:,1) A(:,5:8)-b(:,2) A(:,9:12)-b(:,3)] out = out - c

4달 전 | 0

| 수락됨

답변 있음

How to extract cell array data to numeric arrays or a single multidimensional array

If I understand correctly, you should be able to extract the kth individual array using something like: A = data{k}

How to extract cell array data to numeric arrays or a single multidimensional array

If I understand correctly, you should be able to extract the kth individual array using something like: A = data{k}

4달 전 | 0

| 수락됨

답변 있음

Complex numbers from for loop (daisyworld model)

Without going through your code in detail (there is a lot there) I would suspect that you are raising negative values to fractio...

Complex numbers from for loop (daisyworld model)

Without going through your code in detail (there is a lot there) I would suspect that you are raising negative values to fractio...

4달 전 | 0

| 수락됨

답변 있음

anova1: Operands to the || and && operators must be convertible to logical scalar values.

I don't think you have defined your grouping variable, second argument to anova1 correctly. According to the documentation it m...

anova1: Operands to the || and && operators must be convertible to logical scalar values.

I don't think you have defined your grouping variable, second argument to anova1 correctly. According to the documentation it m...

4달 전 | 0

| 수락됨

답변 있음

Non-linear coupled ODE system of equations

As Bjorn has suggested, you must guard against values of theta where cot(theta) goes to +/- infinity, e.g. 0,pi Your code seems...

Non-linear coupled ODE system of equations

As Bjorn has suggested, you must guard against values of theta where cot(theta) goes to +/- infinity, e.g. 0,pi Your code seems...

4달 전 | 0

| 수락됨

답변 있음

Matrix dimensions must agree.

In order to subtract one matrix from another they must be the same size (same number of rows and columns). The error is telling ...

Matrix dimensions must agree.

In order to subtract one matrix from another they must be the same size (same number of rows and columns). The error is telling ...

5달 전 | 1

답변 있음

How can I import multiple .CSV files in MATLAB and process the data of each file?

It looks like you are on the right track with your looping on the file names. It is a little confusing adding the data as an ad...

How can I import multiple .CSV files in MATLAB and process the data of each file?

It looks like you are on the right track with your looping on the file names. It is a little confusing adding the data as an ad...

5달 전 | 0

| 수락됨

답변 있음

How to convert cell to a struct with fields and multiple dimensions?

I think this would do what you are looking for % example make up some data just to try it P_ungedeckt_h = cell(2,1); for k = ...

How to convert cell to a struct with fields and multiple dimensions?

I think this would do what you are looking for % example make up some data just to try it P_ungedeckt_h = cell(2,1); for k = ...

5달 전 | 0

| 수락됨

답변 있음

2 equations in one function matlab

When you called it did you call it with two output arguments? e.g. radius = 5 [A,C] = myfunction(radius) Also, you reassign t...

2 equations in one function matlab

When you called it did you call it with two output arguments? e.g. radius = 5 [A,C] = myfunction(radius) Also, you reassign t...

5달 전 | 0

| 수락됨

답변 있음

generate multiple text files from a matrix

While I was working on this I see you have already received an answer. This is probably similar to what Mathieu has already subm...

generate multiple text files from a matrix

While I was working on this I see you have already received an answer. This is probably similar to what Mathieu has already subm...

5달 전 | 0

답변 있음

How to recover the original signal from a noisy signal?

You need to low pass filter the data and then downsample it. If you have the Signal Processing Toolbox you can do these togethe...

How to recover the original signal from a noisy signal?

You need to low pass filter the data and then downsample it. If you have the Signal Processing Toolbox you can do these togethe...

5달 전 | 0

| 수락됨

답변 있음

Function fitting on a set of data points

It seems like you are not using the parameters you just solved for when evaluating your function to plot it. Maybe you meant p...

Function fitting on a set of data points

It seems like you are not using the parameters you just solved for when evaluating your function to plot it. Maybe you meant p...

5달 전 | 2

답변 있음

How to generate a costant signal?

Here's an example that you can add to the bottom of your code %% Constant signal sigVal=3; % example value x_const = sigVal*o...

How to generate a costant signal?

Here's an example that you can add to the bottom of your code %% Constant signal sigVal=3; % example value x_const = sigVal*o...

5달 전 | 1

| 수락됨

답변 있음

How to Remedy Matrix Dimensions Error

I think the + operator for strings was not available in 2012 you should instead concatenate the strings e.g. FM = [dir(fullfile...

How to Remedy Matrix Dimensions Error

I think the + operator for strings was not available in 2012 you should instead concatenate the strings e.g. FM = [dir(fullfile...

5달 전 | 1

| 수락됨

답변 있음

Unable to perform assignment because the left and right sides have a different number of elements.

I'm sorry I don't have time to fully understand your code, from a quick look I think your problem may be in your function at lin...

Unable to perform assignment because the left and right sides have a different number of elements.

I'm sorry I don't have time to fully understand your code, from a quick look I think your problem may be in your function at lin...

5달 전 | 0

답변 있음

Error using fmincon, Supplied objective function must return a scalar value.

I'm not quite sure about the details of your problem but I think you want to do something closer to this. Note the objective f...

Error using fmincon, Supplied objective function must return a scalar value.

I'm not quite sure about the details of your problem but I think you want to do something closer to this. Note the objective f...

5달 전 | 0

답변 있음

Substitute s for jw in a transfer function

Hi, I think you mean that you define your transfer function using (you forgot the tf() in your example) G = tf([1 2],[3 4 5])...

Substitute s for jw in a transfer function

Hi, I think you mean that you define your transfer function using (you forgot the tf() in your example) G = tf([1 2],[3 4 5])...

5달 전 | 0

| 수락됨

답변 있음

how the series of 2 stable discrete-systems becomes unstable?

I think you are seeing some roundoff or other numerical issues. Higher order polynomials (in your case a 5th order polynomial) a...

how the series of 2 stable discrete-systems becomes unstable?

I think you are seeing some roundoff or other numerical issues. Higher order polynomials (in your case a 5th order polynomial) a...

5달 전 | 0

| 수락됨

답변 있음

Extracting values from Nyquist Diagram in a personalized way

Without seeing your whole code it is a little difficult to be sure what the problem is, but it is most likely that the range of ...

Extracting values from Nyquist Diagram in a personalized way

Without seeing your whole code it is a little difficult to be sure what the problem is, but it is most likely that the range of ...

5달 전 | 0

| 수락됨

답변 있음

How to give my PI controller initial value?

If you want the inital output of your PI controller to be 1800 when the error signal is zero then set the initial value of the i...

How to give my PI controller initial value?

If you want the inital output of your PI controller to be 1800 when the error signal is zero then set the initial value of the i...

5달 전 | 0

답변 있음

New to matlab and not sure how to reduce to first order

Define y1 = y y2 = y' y3 = y'' % and then make a function f, for example put the code below into an m-file called f.m funct...

New to matlab and not sure how to reduce to first order

Define y1 = y y2 = y' y3 = y'' % and then make a function f, for example put the code below into an m-file called f.m funct...

6달 전 | 0

답변 있음

How do I update a variable in a nested loop?

If you want iter to increment inside of the inner loop you have to move the statement iter = iter+1; inside of the inner loop....

How do I update a variable in a nested loop?

If you want iter to increment inside of the inner loop you have to move the statement iter = iter+1; inside of the inner loop....

6달 전 | 0

답변 있음

How to fix in Gauss formula

It looks like in your calculation of c in both the Jacobi and Gauss you should do a Matrix -vector multiply not an element by el...

How to fix in Gauss formula

It looks like in your calculation of c in both the Jacobi and Gauss you should do a Matrix -vector multiply not an element by el...

6달 전 | 0

| 수락됨

답변 있음

How can I replace images inside a folder with another image from different folder?

If I understand what you are trying to do I think the copyfile function should do what you want Type doc copyfile on the comman...

How can I replace images inside a folder with another image from different folder?

If I understand what you are trying to do I think the copyfile function should do what you want Type doc copyfile on the comman...

6달 전 | 0

| 수락됨

답변 있음

How to create an array of files names from a structure created by 'dir' result?

This will put them into a cell array list = dir('*.txt') filenames = {list.name}

How to create an array of files names from a structure created by 'dir' result?

This will put them into a cell array list = dir('*.txt') filenames = {list.name}

6달 전 | 1

답변 있음

Correlation matrix graph using excel data

Get the data from the Excel worksheet into MATLAB matrices using readmatrix, then use MATLAB's corr function You can get docu...

Correlation matrix graph using excel data

Get the data from the Excel worksheet into MATLAB matrices using readmatrix, then use MATLAB's corr function You can get docu...

6달 전 | 0