回答済み

not enough argument input

You need to put your function code into a file called dew_point.m Then you need to call your function with inputs, e.g. T = so...

not enough argument input

You need to put your function code into a file called dew_point.m Then you need to call your function with inputs, e.g. T = so...

4ヶ月 前 | 1

回答済み

Can someone help me Create a function called that will automatically generate an array where the elements in the array are the sum of the indices? i am lost on this.

If I understand your description correctly, the magic( ) function has nothing to do with your assignment. You are simply asked t...

Can someone help me Create a function called that will automatically generate an array where the elements in the array are the sum of the indices? i am lost on this.

If I understand your description correctly, the magic( ) function has nothing to do with your assignment. You are simply asked t...

4ヶ月 前 | 1

| 採用済み

回答済み

Data arithmatic addition with single precision

Floating point operations will often yield slightly different results if you change the order of operations. This is to be expec...

Data arithmatic addition with single precision

Floating point operations will often yield slightly different results if you change the order of operations. This is to be expec...

4ヶ月 前 | 0

回答済み

How to locate the index of the maximum value in a given range

Use the 2nd output of the max function: [p,i] = max(y); p is the max value, i is the index of the max value t(i) is the value...

How to locate the index of the maximum value in a given range

Use the 2nd output of the max function: [p,i] = max(y); p is the max value, i is the index of the max value t(i) is the value...

4ヶ月 前 | 0

| 採用済み

回答済み

Change all elements in 2nd column to 3

vArr(:,2) = _____; % <-- you fill in the blank

Change all elements in 2nd column to 3

vArr(:,2) = _____; % <-- you fill in the blank

4ヶ月 前 | 0

回答済み

Create array Arr with 5 rows and 4 columns with each element = 5

Yes. Replace all of your numbers with 5 and you will have it. E.g., Arr = [5 5 5 5; etc. This is the hardest way to accomplish...

Create array Arr with 5 rows and 4 columns with each element = 5

Yes. Replace all of your numbers with 5 and you will have it. E.g., Arr = [5 5 5 5; etc. This is the hardest way to accomplish...

4ヶ月 前 | 0

回答済み

Create array Arr with 5 rows and 4 columns with each element = 5

Hint: doc zeros doc ones doc repelem doc repmat

Create array Arr with 5 rows and 4 columns with each element = 5

Hint: doc zeros doc ones doc repelem doc repmat

4ヶ月 前 | 0

回答済み

if i have 256x256 matrix and i want to zero padding it to 512x512 how can i do ?

If you just want it padded on two sides, then simply k_im = your 256x256 matrix k_im(512,512) = 0; % pad 0's out to (512,512) ...

if i have 256x256 matrix and i want to zero padding it to 512x512 how can i do ?

If you just want it padded on two sides, then simply k_im = your 256x256 matrix k_im(512,512) = 0; % pad 0's out to (512,512) ...

4ヶ月 前 | 0

回答済み

How can I plot accleration in the x, y, and z directions? Each accerlation coordinate a(x,y,z) is associated with a moment in time.

Would a simple 2D plot suffice? E.g., plot(t,x,t,y,t,z); grid on legend('x','y','z'); xlabel('time') ylabel('acceleration'...

How can I plot accleration in the x, y, and z directions? Each accerlation coordinate a(x,y,z) is associated with a moment in time.

Would a simple 2D plot suffice? E.g., plot(t,x,t,y,t,z); grid on legend('x','y','z'); xlabel('time') ylabel('acceleration'...

4ヶ月 前 | 1

回答済み

how to write the this in matlab e^((x^-1)/2) -1

y = exp((x.^2-1)/2) - 1; See the Getting Started section of the doc for initial help on writing MATLAB code.

how to write the this in matlab e^((x^-1)/2) -1

y = exp((x.^2-1)/2) - 1; See the Getting Started section of the doc for initial help on writing MATLAB code.

4ヶ月 前 | 0

| 採用済み

回答済み

Save serial datenum as decimal, not scientific notation

First, MATLAB stores all doubles the same way ... as IEEE binary floating point format. What you are seeing as "737389.4167 beco...

Save serial datenum as decimal, not scientific notation

First, MATLAB stores all doubles the same way ... as IEEE binary floating point format. What you are seeing as "737389.4167 beco...

4ヶ月 前 | 0

回答済み

Breaking changes for C++ API?

The current online doc for mxCreateStructMatrix( ) says the last argument must contain "... one or more field names ...", which ...

Breaking changes for C++ API?

The current online doc for mxCreateStructMatrix( ) says the last argument must contain "... one or more field names ...", which ...

4ヶ月 前 | 0

回答済み

Writing a funciton for e^x values?

You use the same n value for the first three terms. You need to increment n each time you add a term, including the first two t...

Writing a funciton for e^x values?

You use the same n value for the first three terms. You need to increment n each time you add a term, including the first two t...

4ヶ月 前 | 0

回答済み

Trying to write a function for the inverse of a matrix.

You are missing the part where you append the identity matrix to the right side of A before you start your Gauss elimination. So...

Trying to write a function for the inverse of a matrix.

You are missing the part where you append the identity matrix to the right side of A before you start your Gauss elimination. So...

4ヶ月 前 | 0

回答済み

mex fortran code containing intrinsic function using Intel fortran compiler

Can you post the offending code? Maybe you are calling it with a non-real argument and the compiler is complaining that it can't...

mex fortran code containing intrinsic function using Intel fortran compiler

Can you post the offending code? Maybe you are calling it with a non-real argument and the compiler is complaining that it can't...

4ヶ月 前 | 0

回答済み

How to re-prompt user input if given incorrect value?

str2double will turn your inputs into numeric, so you will pass your isnumeric( ) test even if there are problems. Instead, chec...

How to re-prompt user input if given incorrect value?

str2double will turn your inputs into numeric, so you will pass your isnumeric( ) test even if there are problems. Instead, chec...

4ヶ月 前 | 0

| 採用済み

回答済み

Can not use the Fibonacci built in function

For simplicity, let's assume you don't know how many iterations you need in advance. So start with your current code: while x <...

Can not use the Fibonacci built in function

For simplicity, let's assume you don't know how many iterations you need in advance. So start with your current code: while x <...

4ヶ月 前 | 0

回答済み

Trapezoidal rule in a for loop

You made a good start, but there are several problems with your summation. You don't accumulate into your trapez variable, you ...

Trapezoidal rule in a for loop

You made a good start, but there are several problems with your summation. You don't accumulate into your trapez variable, you ...

4ヶ月 前 | 0

| 採用済み

回答済み

Why is my own echelon function printing incorrect matrix

I haven't checked all of your code, but I assume this: if ~all(A(k,:))==0 %check to see if row of zeros or not was meant to be...

Why is my own echelon function printing incorrect matrix

I haven't checked all of your code, but I assume this: if ~all(A(k,:))==0 %check to see if row of zeros or not was meant to be...

4ヶ月 前 | 0

| 採用済み

回答済み

(1/x)>2 . why x<(1/2) is Not the answer

When you multiply (or divide) an inequality by a value, the direction of the inequality changes if the value is negative. So whe...

(1/x)>2 . why x<(1/2) is Not the answer

When you multiply (or divide) an inequality by a value, the direction of the inequality changes if the value is negative. So whe...

4ヶ月 前 | 0

回答済み

How to compare element between two numbers

Like Rik, I am not sure what comparison you are doing based on your terse description. Maybe this, but it doesn't match your st...

How to compare element between two numbers

Like Rik, I am not sure what comparison you are doing based on your terse description. Maybe this, but it doesn't match your st...

4ヶ月 前 | 0

回答済み

[mexFunction in Matlab] printf() function in C code

How you have it written should work, except maybe replace printf( ) with mexPrintf( ). Also, depending on your compiler and sett...

[mexFunction in Matlab] printf() function in C code

How you have it written should work, except maybe replace printf( ) with mexPrintf( ). Also, depending on your compiler and sett...

4ヶ月 前 | 0

回答済み

How to return the outputs of mexFunction() in Matlab?

Put this at the bottom of your code. But remember that if you call mexErrMsgTxt your mex function will exit immediately and not ...

How to return the outputs of mexFunction() in Matlab?

Put this at the bottom of your code. But remember that if you call mexErrMsgTxt your mex function will exit immediately and not ...

4ヶ月 前 | 1

回答済み

Error: Matrix dimensions must agree

You could use V(2:end) or V(1:end-1) instead of V in that line. Or maybe average the two.

Error: Matrix dimensions must agree

You could use V(2:end) or V(1:end-1) instead of V in that line. Or maybe average the two.

4ヶ月 前 | 0

| 採用済み

回答済み

Write a MATLAB code to estimate the exponential function. Inputs should be x and n. The outputs must include approximate value, true value, error, absolute error, and relative error.

Put your function code for e_to_x() in a separate file called e_to_x.m somewhere on the MATLAB path. Then put your other code t...

Write a MATLAB code to estimate the exponential function. Inputs should be x and n. The outputs must include approximate value, true value, error, absolute error, and relative error.

Put your function code for e_to_x() in a separate file called e_to_x.m somewhere on the MATLAB path. Then put your other code t...

4ヶ月 前 | 0

回答済み

Kindly give me the Matlab code for simplex method?

Use the MATLAB supplied function fminsearch.

Kindly give me the Matlab code for simplex method?

Use the MATLAB supplied function fminsearch.

4ヶ月 前 | 0

| 採用済み

回答済み

Error when calling the mexFunction

You probably should have gotten a warning from the compiler that your callFun( ) function doesn't return anything, even though t...

Error when calling the mexFunction

You probably should have gotten a warning from the compiler that your callFun( ) function doesn't return anything, even though t...

4ヶ月 前 | 0

| 採用済み

回答済み

How to turn assigned vectors into a 3x3 matrix?

Assuming vec3 is a typo, result = [vec1;vec2;vec3]; If you need to, you can transpose the result. If your vec3 is not a typo,...

How to turn assigned vectors into a 3x3 matrix?

Assuming vec3 is a typo, result = [vec1;vec2;vec3]; If you need to, you can transpose the result. If your vec3 is not a typo,...

4ヶ月 前 | 0

回答済み

[Create mexfunction from C code] The order of several c files

The order you compile your source code files should not matter. The error seems to be that the compiler can't find the resource...

[Create mexfunction from C code] The order of several c files

The order you compile your source code files should not matter. The error seems to be that the compiler can't find the resource...

4ヶ月 前 | 0

回答済み

When I try to run a function in matlab, I get an error, it is undefined

Put this code in a file called checkEchelonMatrix.m that is on the MATLAB path: function [result] = checkEchelonMatrix(M) %res...

When I try to run a function in matlab, I get an error, it is undefined

Put this code in a file called checkEchelonMatrix.m that is on the MATLAB path: function [result] = checkEchelonMatrix(M) %res...

4ヶ月 前 | 0

| 採用済み