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

etwa 4 Jahre vor | 1

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 1

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 1

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 1

| akzeptiert

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 1

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 1

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

| akzeptiert

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

Beantwortet
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)

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

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

etwa 4 Jahre vor | 0

| akzeptiert

Mehr laden