문제를 풀었습니다


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

대략 14년 전

답변 있음
Cannot accèss methods of an Object after modified
You need to use handle object. Use the following line in your class definition classdef junk < handle You can then write...

대략 14년 전 | 0

| 수락됨

답변 있음
Cannot accèss methods of an Object after modified
You need to instantiate the class first in myFunction. The code as is just create a struct obj in myFunction that has a field na...

대략 14년 전 | 0

답변 있음
Reading images from a folder ony by one
You can use |dir| and filter out the files you need, for example, let's say you want to read in all the jpg files in the folder ...

대략 14년 전 | 0

답변 있음
compare integer values
Say you have the matrix |A|, and you have a function |foo| contains the operation you'd like to apply to elements of |A| if they...

대략 14년 전 | 0

답변 있음
Some help to find the max value of a function?
Why not use |max|, e.g., max(Yi(:,1)) For details, see the documentation doc max

대략 14년 전 | 0

| 수락됨

답변 있음
Plotting a 3d model
You can try |mesh|, |surf| and |image| doc mesh doc surf doc image

대략 14년 전 | 0

| 수락됨

답변 있음
Receiving mtimes error for passing vector through a function and I don't know why. Help?
You need to use .* y = exp(2*sin(0.4*x))*5 .* cos(4*x);

대략 14년 전 | 1

| 수락됨

답변 있음
Erlang Random variable
In theory Erlang is the sum of exponential distributed random variables, so you can just do the same. If you have Statistics Too...

대략 14년 전 | 0

| 수락됨

답변 있음
write and reading array from 2 functions files at the same time
Looks like you want to do stream processing. I would suggest you to take a look at the example in the following page http://w...

대략 14년 전 | 0

답변 있음
function command hellp
Then I will rewrite the other file into a function, using signatures like function [T,Z,A,B] = foo(R) Once you do that, ...

대략 14년 전 | 0

답변 있음
function command hellp
Let's say the other file is |foo.m|, then you can modify the signature of |foo| to return those values, e.g. function [...,...

대략 14년 전 | 0

답변 있음
Not able to rotate an object in matlab?
Hi Simar, I think your program is doing what you want it to do, it rotates the whole thing 90 degrees in respect to the x axi...

대략 14년 전 | 0

| 수락됨

답변 있음
Use Matlab to graph piece wise function
You need to use .^ when raising a vector to a power. This being said, I would just take advantage of the logical index: x =...

대략 14년 전 | 0

답변 있음
Help to write a simple codë to split vector to subvectors
Are all Y1 through Ym equal length. If so, assume the length is N, then you can do y = reshape(Y,3*N,[]) and each colum...

14년 초과 전 | 0

| 수락됨

답변 있음
Using indices of array to define indices of cell array
Similar to what you did for vectors: C{A>3}

14년 초과 전 | 0

답변 있음
Sum Like Kind (not cumsum)
I don't know what the format is for your serial data so I'll just give an example where I add values of y when x is within a reg...

14년 초과 전 | 0

답변 있음
how to call a sub function in the main function
Your output, F, is never defined in f() function. In addition, you are rewriting your input x1 in that function too.

14년 초과 전 | 0

답변 있음
Help with loop (for?)
I don't quite understand what you do with i=i', but I think what you want is Angle = rand(5,3); for m = 1:5 kinimat...

14년 초과 전 | 0

| 수락됨

답변 있음
Saving figure
You can use |imwrite| and |date| doc imwrite doc date

14년 초과 전 | 0

답변 있음
polyfit question
It means avg_Y = 0.0042*x+2.5802 see doc polyfit

14년 초과 전 | 0

| 수락됨

답변 있음
How to implement a Bivariate Normal Density function when your mu is given in a column matrix
Just pass in |mu.'| instead, i.e., mvnpdf(x,mu.')

14년 초과 전 | 0

답변 있음
function feval
It looks like your untitled2 is a script, not a function, hence cannot be evaluated by |feval|. To define a function, you need t...

14년 초과 전 | 0

| 수락됨

답변 있음
Error using ==> horzcat CAT arguments dimensions are not consistent. Help please !
When x1=x2 but y1~=y2, your A1 is a scalar but A2 is a column vector, hence it cannot be concatenated. Similar thing for x1~=x2 ...

14년 초과 전 | 1

| 수락됨

답변 있음
determinant of covariance matrix
What you have is rank-deficient so the determinant will be 0. If you just want the algorithm to work, you can try to do the diag...

14년 초과 전 | 0

답변 있음
determinant of covariance matrix
Maybe your data matrix has correlated components so the resulting covariance matrix is not full rank?

14년 초과 전 | 0

답변 있음
@ function handle help for finance
I don't quite see the relation of inputs. It looks like Alpha and Lag are constants and it has nothing to do with x, so what's t...

14년 초과 전 | 0

답변 있음
How do I suppress answer in Matlab?
Just don't define output in the function definition line, or when you call the function, add semicolon at the end, i.e., fi...

14년 초과 전 | 0

| 수락됨

답변 있음
Function to Vector
If I understand your question correctly, you need to do for i = 1:10 a(i) = crr(x(i)) end But you could try |arr...

14년 초과 전 | 0

답변 있음
LPF a random signal
You need to first determine what are the frequencies you want to keep and what are the frequencies you want to filter out. You c...

14년 초과 전 | 1

| 수락됨

더 보기