已回答
Minimising the variance of a portfolio using weights of assets and covariance matrix
If you have the additional constrain that the weights must sum to 1 than you must also increase the lower bound. Otherwise the o...

4 years 前 | 1

| 已接受

已回答
fitgpr gaussian regression parameters
A Gaussian Process Regression is a non-parametric model, which means it heavily depends of the training data you use. This means...

4 years 前 | 0

| 已接受

已回答
How can I use uigetfile when I click on an edit text in a GUI?
You can't. Every GUI component has it's own callbacks, for the edit text element you have callbacks such as key press/release an...

4 years 前 | 0

已回答
Write cell array to excel format with xlswrite
You need to check the syntax of xlswrite, then you see that you're calling it with wrong arguments. You have to transform your a...

4 years 前 | 0

| 已接受

已回答
curve fitting and image segmentation
In this case, for each column you have there's a different line point, so you have to check for each one individually and do the...

4 years 前 | 0

| 已接受

已回答
How to modify the values of axis (image explaining better)
Just check the first example of mathworks here. You can solve your problem by using xticks (and eventually xtickslabel if you wa...

4 years 前 | 1

| 已接受

已回答
running a file from inside a parfor loop
The main problem is that parfor can not tell from which workspace the variables should be used since you have many. You can solv...

4 years 前 | 0

| 已接受

已回答
please help write matlab code that plots the following function
You have a complex function, so you should define what exactly you want to plot of this function. Some alternatives are the foll...

4 years 前 | 0

| 已接受

已回答
Sum only consecutive positive numbers and place the sum in a new vector in specific positions
Try this: lo = P1 > 0; Dfference = diff([lo(:);0]); Ends = find(Dfference==-1); % -1 are the positions where a sequence en...

4 years 前 | 0

已回答
Multiplying by the number of the day of each month in a cell arrays
Days will not calculate the days in a specific month, you have to do it manually, so you have to check which years are leap year...

4 years 前 | 1

已回答
How could add noise to a music file in a way that after a certain amount of time the music file become noise free?
You were almost there. The array you have to shorten is the noise one, while, at the same time, adding it only at the initial va...

4 years 前 | 0

已回答
How do I pull Time values from the found indicies of Force?
indBefore10 contains only the index, not the force itself, you have to give then back to the force array to actually get the res...

4 years 前 | 0

| 已接受

已回答
unknown code- understand it up to the for loop but am lost from there. Can anyone lend a hand? thanks.
What the code was supposed to be? it looks like the variable out is suppose to be the numerical derivative of b with respect to ...

4 years 前 | 1

| 已接受

已回答
How to use the log-binning of the Fourier energy spectrum?
I'm not entirely sure what you mean by log-binning, but a regular interpretation for it is just to resample the fft in log-space...

4 years 前 | 0

已回答
Can MATLAB select few dll files instead of whole large MCR to run a executable program files using GUIDE?
Matlab kind of already does this in your executable file. If you, for example, try to compile some p-files it is possible that t...

4 years 前 | 0

已回答
How can I incoporate choice set information in the multinomial logistic regression?
What you expect to gain giving the set information? If you do it individually per costumer you lose almost all of your generaliz...

4 years 前 | 0

已回答
Matlab returns different values with two equivalent functions
The difference between then in my computer with your example is -3.197442310920451e-14 (depending of your processor may be sligh...

4 years 前 | 1

| 已接受

已回答
Scaling Objective Function for Widely Varying Parameters: Data Fitting with lsqcurvefit
The main problem actually isn't the scaling but rather the optimization algorithm. Your function seems to be extremely non-smoot...

4 years 前 | 0

| 已接受

已回答
Error in Saving mat file
You can use the version 7,3 like this: save('DATA.mat','DATA','-v7.3');

4 years 前 | 0

已回答
Opening Multiple Gui Problem
When you do save CVD save PVD ... you're actually saving your whole workspace, and thus later when you load it, you, at the...

4 years 前 | 0

| 已接受

已回答
How to generate noise from 950 to 1050 Hz for 0.2 sec?
Choose Fs, generate broadband noise, filter with a bandpass: Fs = 44100; Tmax = 0.2; Samples = Tmax*Fs; noise = randn(Samp...

4 years 前 | 1

| 已接受

已回答
Inverse Fourier transform from logged fft data
You can't exactly reconstruct the time signal since you lost the phase information while transforming it to dB. The best you can...

4 years 前 | 0

| 已接受

已回答
Question on generating echo effect
Try this function [eSound]=audioEcho( audioVec, Fs, delay,echoGain) delaySamples= round(Fs * delay); delayVec = zeros(size(...

4 years 前 | 0

| 已接受

已回答
Method to plug in a value
I would agree with dpb that the best way is to use anonymous functions, the only thing that you additionally need is to be able ...

4 years 前 | 0

| 已接受

已回答
I need matlab code to generate smooth curve for data set
if you look at the result you will see the fit function for each curve. In your actual image the "f(x)=a*x^b+c" with the coeffic...

4 years 前 | 0

已回答
Unable to perform assignment because the size of the left side is 4-by-1 and the size of the right side is 4-by-4 Error.
The dimensions of your X point and your step are wrong (1x4 and 4x1), you can just transpose one of them to fix your problem X ...

4 years 前 | 0

已回答
Write a syntax to plot a 2D graph of function 1/( 2x^2 - 1).
x = 1:10; y = 1./(2*x.^2-1); figure,plot(x,y)

4 years 前 | 0

已回答
Solve optimization problem using fmincon
The answer depends on how you define your problem. If y is variable and it should be minimized together with your x than it belo...

4 years 前 | 0

已回答
Hi, I am new to MATLAB. I was trying to subtract the consecutive number in the series with the previous number and then storing this number to a new matrix. I implemented the following code but I need some help.
In Matlab what you want to do is a one line code, you should always try to vectorize your operations or use build in function, s...

4 years 前 | 0

已回答
fitting 2d data set fit function is not working
The problem is that your z data is defined in a grid while your x and y define only the vectors of this grid. If you first actua...

4 years 前 | 0

| 已接受

加载更多