prashantgujjar
prashantgujjar
Prashant Gujjar
158 posts
Don't wanna be here? Send us removal request.
prashantgujjar · 1 year ago
Text
Writing Data to text file gives error,unknown parameter
hi All
I am trying to write some parameter to a py file as follows
Let’s say I have the m-file 1 that contains the parameters like p=2,,,, q=3*p ,,,,,, and tf=1
m-file 2 is a function like : mvar(m) , I always assign m=1,
file 1 runs m-file 2 that contains these lines:
fid = fopen(‘myparams.py’, ‘w’);
fprintf(fid,’p1 = %d\n’,p1);
fprintf(fid,’q = %0.12f\n’,q); fprintf(fid,’tf= %0.12f\n’,tf);
to write them on the third file myparams , it writes the first 2 but for the last one, tf , it gives error , while it is introduced in the same way also I dont know the difference of %d\n with %12f\n
the error is
Function is not defined for ‘tf’ inputs
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
%d is used when you want to write an integer (1,2,3,…)
%f and all derivative (%12f,…) are used to write float numbers (specify the precision, add spaces,..)
see the help of fprintf.
and I just try the code bellow, it works.p = 2; q = 3*p; tf = 1 ;fid = fopen('myparams.py', 'wt'); fprintf(fid,'p1 = %d\n',p); fprintf(fid,'q = %d\n',q);
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
how to create speech waves with equal loudness in matlab ?
hi frnds,
i want matlab command or code for making speech waves with equal loudness in matlab i.e speech waves with same intensity and frequency.
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
I suggest you to use Microsoft Anna (Text to Speech) and save the sound in a *.wav file or *.mp3 file.
Then import the sound file to MATLAB.
To equalize the loudness you could try this options:
Use the soundsc command:
[y1,Fs1] = audioread('myRecord1.wav'); [y2,Fs2] = audioread('myRecord2.wav'); y1n = soundsc(y1,Fs1); y2n = soundsc(y2,Fs2);
Use FFT to equalize the median dB
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
How to insert a string into a sprint?
I want the input stored into name be displayed in the %s. How can I do it? it is possible?name = input ('Enter the name of the voice command'); file = sprintf('%s.wav','name'); %name the sound file to be created
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Try this more user friendly and robust way to “get the name of the sound file to be created”:% Ask user for the name of the file to be created. [baseFileName, folder] = uiputfile('*.wav', 'Enter the file name of the voice command to be created') % Create the full file
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
How to import data with titles and plot on a plane ?
I have droplet diameter and coordinates in a CSV file and I want to draw the all these points in 3d space and later project them on a 2D plane. can someone suggest how can I read this data. Thanks in advance.
Tumblr media
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
I am not exactly certain what you want. One way of plotting them in 3D and also projecting them on a plane is to combine a stem3 plot and a scatter3 plot — Uz = unzip('data.zip'); % fc = fileread(Uz{1}) fidi = fopen(Uz{1},'rt'); k = 1; while ~feof(fidi) & (k<=10) rl{k,:} = fgetl(fidi); k = k+1; end fclose(fidi); VN = strsplit(rl{4}, ' '); droplets = readtable(Uz{1}, 'FileType','text', 'HeaderLines',5); droplets.Properties.VariableNames = VN(2:end-1) droplets = 4670×20 table TIME X-Coord Y-Coord Z-Coord Diameter Density U-Velo V-Velo W-Velo UT-Velo VT-Velo WT-Velo Temperatur Life_Time Weber_No Stokes_No Ident Nozzle Proc Imping ____ _________ _________ __________ __________ _______ _________ _________ _________ ___________ __________ ___________ __________ _________ __________ __________ _____ ______ ____ ______ 0.05 -0.090385 -0.032003 0.0081542 3.4145e-05 959.89 -0.031454 -0.038965 0.013472 -0.0041884 -0.0013082 0.002092 373.15 0.045 7.6791e-07 0.033496 3448 1 7 0 0.05 -0.091358 -0.03418 0.015947 3.6409e-05 959.89 -0.048048 -0.024729 0.016297 -0.0023005 -0.0014205 -0.00089046 373.15 0.0445 1.1324e-06 0.00046301 4065 1 7 0 0.05 -0.095208 -0.030039 -0.0036156 4.1337e-05 959.89 -0.027739 -0.090139 -0.030527 0.022442 -0.021859 0.0024811 373.15 0.0405 2.1372e-06 0.34806 9022 1 7 0 0.05 -0.095018 -0.040921 0.020399 4.6496e-05 959.89 -0.079326 -0.031016 0.016833 0.0010701 -0.0014528 0.0018666 373.15 0.045 3.397e-06 0.0010893 3546 1 7 0 0.05 -0.084277 -0.045149 0.0052363 5.266e-05 959.89 -0.075503 -0.059956 0.0044079 -0.00036266 -0.0015555 0.0017451 373.15 0.045 4.3691e-06 0.00056493 3396 1 7 0 0.05 -0.095041 -0.038119 -0.027047 7.8739e-05 959.89 -0.074046 -0.2798 -0.22825 -0.001181 0.0013092 -0.0007613 373.15 0.0355 0.00010153 0.0026183 11904 1 7 0 0.05 -0.093338 -0.034883 0.022804 5.1174e-05 959.89 -0.075775 -0.057902 0.049309 -0.00028933 0.0017213 0.0013845 373.15 0.0395 5.1543e-06 0.00062802 9929 1 7 0 0.05 -0.090707 -0.057069 -0.0059532 5.417e-05 959.89 -0.088391 -0.071006 -0.013249 0.00022564 0.0013297 -0.00069184 373.15 0.0435 7.0252e-06 0.00037145 5231 1 7 0 0.05 -0.095023 -0.052208 -0.0054762 5.8263e-05 959.89 -0.10234 -0.094789 -0.013927 -0.00076917 0.00018328 0.00095466 373.15 0.0445 1.0662e-05 0.0093345 4165 1 7 0 0.05 -0.089498 -0.035614 0.044709 0.00013526 959.89 -0.014238 -0.41357 0.61117 0.00063334 0.00078877 0.00083319 373.15 0.041 0.00074065 0.0022664 8373 1 7 0 0.05 -0.091463 -0.031236 0.010759 4.5083e-05 959.89 -0.053295 -0.0458 0.020416 0.0003124 0.0058428 -0.00058846 373.15 0.045 2.3234e-06 0.10925 3510 1 7 0 0.05 -0.08727 -0.036753 0.0073399 4.3337e-05 959.89 -0.054384 -0.031757 0.0052104 -0.00040866 0.0016526 -0.0001831 373.15 0.0435 2.193e-06 0.00071105 5235 1 7 0 0.05 -0.078492 -0.045156 -0.014288 5.0382e-05 959.89 -0.068305 -0.039995 -0.012197 0.0013146 -0.0024517 -0.0018704 373.15 0.045 3.5571e-06 0.00043666 3481 1 7 0 0.05 -0.09666 -0.029865 0.009483 3.4918e-05 959.89 -0.042103 -0.066528 0.022839 0.0021231 -0.014508 0.0011205 373.15 0.0445 8.4588e-07 0.24043 4038 1 7 0 0.05 -0.081006 -0.047258 -0.01738 0.00020125 959.89 0.18871 -0.6734 -0.35412 0.00011428 0.0003534 0.00036473 373.15 0.0405 0.0012263 0.0071006 8892 1 7 0 0.05 -0.090334 -0.038719
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
What would be the equation of the following surface?
 I have the raw data of X, Y, Z, where X and Y are inputs and Z is the output. Plotting the surface gives the red curve in the below picture:
Tumblr media
The surface seems to be a simple function involving trigonometric functions. For example, plotting the equation cos(X)^2 + cos(Y)^2 gives the blue surface and it looks similar to the red graph (but the RMS error is very large).
I have tried introducing variables (a1*cos(X)^2 + a2*cos(Y)^2), where a1 and a2 vary from 0 to 1) but the RMS error is still large.
I also tried the surface fitting functions (MATLAB's fit function) but it's models are limited (unlike the curve fitting models which include Fourier series, sin series, etc).
How can I find the equation which gives the red surface?
Edit for clarity: I am able to use the lsqcurvefit (or any other curve fitting toolbox functions) to find which coefficients to use, but I am not sure what the equation should be. cos(X)^2 + cos(Y)^2, for example, is not the right equation but it does have a similar shape.
If this seems improbabilistic, how can I vary cos(X)^2 + cos(Y)^2 to align the end curves of the surface (where there seems to be highest misalignment)?
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Tumblr media Tumblr media Tumblr media
Update 3: Added some surface plots.[X, Y] = meshgrid(-1:0.05:1); %% Polynomial function c = 1; b = 1/2; a = b; Z = c - b*Y.^2 - a*X.^2; % can try higher-order polynomial functions surf(X, Y, Z), grid on title('Quadratic function'), xlabel x, ylabel y, zlabel f(x,y)
Tumblr media
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
How to create a 2-D plot to validate filter characteristics ?
I am running a test signal (white noise) through filter so that i can validate the frequency response and magnitude.
Below is the code I’m using to test the filter%Test 1Fs = 44100 x = randn(1,44100); % Signal = randn (fs*dur,1) shall generate 1 channel signal with certain sampling frequency and duration[b1,a1]=fourbandEQ(30,0,1, 300,0,1, 1000,0,1, 5000,0,1, Fs); y = filter (b1,a1,x); % y = filter(b,a,X) Y is output signal, X is input signal, b is array of %denominator coefficients , a is numerator
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
I can’t run your code, but the easiest way to plot the transfer function is to divide the fft of the output by the fft of the input, then do the appropriate plots:Fn = Fs/2; tf = fft(y)./fft(x); Fv = linspace(0, 1, length(tf)/2+1)*Fn; Ix = 1:length(Fv);figure(1) subplot(2,1,1) plot(Fv, abs(tf(Ix))) grid ylabel('Amplitude')subplot(2,1,2)
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
How to add two different surface curves in a single plot?
Tumblr media
Both are the same curve the only difference is one is without point data and the other has point data.
Problem: I want to add another surface to the same plot for the same data which is at z=1 and parallel to x- and y-axis. Also, is it possible to find the values of major and minor axes of the ellipse formed from the intersection of both the surfaces. Or in other words, the values between the intersection of x and z values of both the curves and the y and z values of both the curves.
I hope I am able to express myself clearly.
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Try this — 
Tumblr media
‘Also, is it possible to find the values of major and
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
How do I get the max value within a specified range on my plot?
Tumblr media
I am writing a program that can read in audio files of recorded guitar notes in standard tuning (e,B,G,D,A,E), plot the signal and the frequency response, then compare the frequency value from the plot with the needed frequency to be in tune. The way I was doing it, was finding the max value or highest peak from the frequency response plot, then comparing it to a specified value needed for it to be in tune. I hit a problem when I got to the G string, because as you can see from the plot, the highest peak is not the first peak, and that is where the frequency I need lies (since a G3 note has to have a frequency of 196 to be in tune), so my method doesn’t work. How can I get the max y value between the 100 & 300 frequency range, then get the x value related to that max value?%Tuning for G String gG = 196.00; %Fourier Transform of G3 On Guitar [y,Fs] = audioread('3rd_String_G_vbr.mp3'); Nsamps = length(y); t = (1/Fs)*(1:Nsamps); %Prepare time data for plot %Do Fourier Transform y_fft = abs(fft(y)); %Retain Magnitude y_fft = y_fft(1:Nsamps/2); %Discard Half of Points f = Fs*(0:Nsamps/2-1)/Nsamps; %Prepare freq data for plot %Find max y value of the highest peak in the range, then find corresponding x %value [maxYValue, indexAtMaxY] = max(y_fft); xValueAtMaxYValue = f(indexAtMaxY(1));
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Use the sampling frequency to find the locations with which to bound the search — HiLo=[100 300]; % frequency bounds nHiLo=round(HiLo/f); % bounding locations [maxYValue, indexAtMaxY] = max(y_fft(nHiLo(1):nHiLo(2)); indexAtMaxY=indexAtMaxY+nHiLo(1); % offset computation
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Text
How to pass a audio signal through a filter?
How to pass a audio signal through a filter ? It should work based on spectral energy i.e if its between 0–4 kHz it falls on speech band and If it falls between 4 kHz-8 kHz then it comes under noise band.Now the VOS(voice operated switch) should be activated if the signal is in speech band and it should be deactivated when it is in noise band. Can some one help me on this problem.
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
The first step is to design a filter to obtain the A and B vector coefficients.Then use the Butter function, for instance to obtain your signal(type Butter in your Matlab command window and you will find many other type of filters). Once you have obtained the B and A vector coefficients you can filter your signal using the function filter.
y=filter(x,A,B) x(is your input signal) and y your filtered signal.
SEE COMPLETE ANSWER CLICK THE LINK
0 notes
prashantgujjar · 1 year ago
Video
youtube
Stretch the dynamic range of the given 8-bit grayscale image using MATL...
0 notes
prashantgujjar · 4 years ago
Video
instagram
Thoughts? — 📷: @technicalsource — #technicalsource #thoughts #warrenbuffett #warrenbuffet #warrenbuffettquotes #warrenbuffettquote #warrenbuffetquotes #warrenbuffettwisdom #charliemunger #invest #entrepreneur #entrepreneurlife #entrepreneurmotivation #success #successquotes #successful #wisdomquotes #successmotivation #mindsetiseverything https://www.instagram.com/reel/CTWi63FJZaJ/?utm_medium=tumblr
0 notes
prashantgujjar · 4 years ago
Text
i get an error when creating newff please help me ..
the excel file has the dataset. it has 24 columns. first 12 columns has the target value 1. the last 12 colums have the target value 0. i wanted to design a NN for classification into 1 or 0. the data was copied to dat file. i selected all the 198 rowsand 24 colums to input.dat . single rown with 24 colums as target.dat and i get the following error . please rectify.
Error:
Error using newff (line 107) Input ranges is not a two column matrix. Error in signature1 (line 17) net=newff(input_n,target_n,13);
close all ; clc; clf; clear all; load input.dat; load target.dat; input1=input(1:198,1:24); target1=target(1:198,1); [input_n,input_n_struct]=mapminmax(input1'); [target_n,target_n_struct]=mapminmax(target1'); net=newff(input_n,target_n,13); net.divideFcn='divideblock'; net.divideParam.trainRatio=80; net.divideParam.valRatio=10; net.divideParam.testRatio=10; net.trainFcn='trainlm';    [net tr Y E]=train(net,input_n,target_n);         % Simulation disp('Simulation Output for the given input'); simoutput=sim(net,input_n); [input_n ; simoutput]; %Output Normalized Version disp('Normalized Simulation Output'); Norm_input=mapminmax('reverse',input_n,input_n_struct); Norm_simoutput=mapminmax('reverse',simoutput',target_n_struct); %[Norm_input Norm_simoutput]; [Norm_input]; [Norm_simoutput] [target Norm_simoutput] % Calculating Mean Square Error perfmse=mse(E); fprintf('Mean Square Error:%d \n',perfmse);
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
It looks like you are using an obsolete version of NEWFF where the first input is minmax(input_n) instead of input_n.
However, even the latest version of NEWFF is obsolete.
What version of MATLAB do you have? Type ver into the command lineThe current versions of MLP are
Regression/curve-fitting: FITNET(calls FEEDFORWARDNET) instead of NEWFIT(calls NEWFF) Classification/pattern-recognition: PATTERNNET(calls FEEDFORWARDNET)instead of NEWPR(calls FEEDFORWARDNET)
0 notes
prashantgujjar · 4 years ago
Text
Back Propagation Neural Network
I need a workable Back Propagation NN code. My Inputs are 100X3 dimension and outputs are 100X2 dimension.Sample size is 100.
For example 1st 5 samples are inputs [-46 -69 -82; -46 -69 -82; -46 -69 -82; -46 -69 -82; -46 -69 -82;... ] and outputs are [0 0;2 1;5 5;4 3; 3 5;...].
Please suggest me if BP is suitable for my problem and what learning technique and activation function will be better to solve this problem? Do I need to apply generalization? Kindly help me with the matlab code if possible. Thank you very much.
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Convert to matrices and transpose  
[I N ] = size(inputs) [ O N ] = size(targets)
Use fitnet for regression and curve-fitting
help fitnet doc fitnet
Use patternnet for classification and pattern-recognitionFor examples beyond the help/doc documentation try searching with
SEE COMPLETE ANSWER CLICK THE LINK
https://www.matlabsolutions.com/resources/back-propagation-neural-network.php
0 notes
prashantgujjar · 4 years ago
Text
Issue with batch normalization layer of saved CNN
When loading a previously trained CNN, I got an issue with the batch normalization layers. When looking into the loaded CNN model the trainable mean and variance are empty.
Name: 'batchnorm_1'
TrainedMean: [] TrainedVariance: [] So the checkpoint doesn't seem to save these parameters. Are there any workarounds for this issue? I am using Matlab R2018b. ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
We were able to reproduce the issue. We will inform you once the issue is fixed.Since TrainedMean and TrainedVariance are calculated after the training is finished, therefore as a workaround you can use the below mentioned codes to explicitly save and load the Model.
%To save model with name "demoModel", assuming your network is in "net" save('demoModel','net')
%To load model to variable net1 net1=load('demoModel.mat','net'); net1.net.Layers(n).TrainedMean %where n is the batch normalization layer
SEE COMPLETE ANSWER CLICK THE LINK
https://www.matlabsolutions.com/resources/issue-with-batch-normalization-layer-of-saved-cnn.php
0 notes
prashantgujjar · 4 years ago
Text
future value prediction using narx
I have a trained series-parallel configuration NARX neural network with %inputs one output value. I have data of 4months 'Aug-nov'.
Now i want to predict the future values of the next week i.e Dec first week. How to do that???
will using sim help??? How??? Any reference??? ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Scanty info.  
[ Xc Xci Aci Tc ] = preparets(netc,X,{},T); [ Yc Xcf Acf ] = net(Xc, Xci, Aci);
where (Xci,Aci) and (Xcf,Acf) are initial and final input and layer states, respectively.
With NARX, you cannot get a valid future output unless you have a valid future input. If you do not have a valid future input you can try to predict one using NARNET. Also you could use NARNET to predict the future output! Obviously, if you do both you can compare and even consider combining.
0 notes
prashantgujjar · 4 years ago
Text
Can I have checkpoints in Bayesian optimization for tuning hyperparameters of a neural network?
I'm trying to implement Bayesian Optimization on a BiLSTM network.
I'm planning to run this code in a university cluster but, they give us maximum of 2 days (48 hours) to run our job and if it goes beyond it, they automatically kill the job which probably will result in wasted time and resources for me and for other students waiting in que. I was wondering if it would be possible to implement some kind of a checkpoint for bayesopt() to continue from where the job is left off: Basically, what I'm asking is if I can save my previous runs (variables bayesopt() observed) and load them in my next run and continue from where it stopped? I have not seen any documentation related to this (I may have missed it).
My understanding with bayesopt() is that, the more points are observed, the more accurate the answers bayesopt() gives. Is this right? If so, that means I might want to try to run it for more than 2 days maybe. The number of cores I can request are limited (the more I request, the longer I wait in que) and from what I'm estimating, the most complex combination of variables can take between 40 mins to 1 hour to train and give me a result ( obviously, not every combination will take this much time).
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Currently, there is no checkpointing argument. However, you can use the 'OutputFcn' argument along with the 'SaveFileName' argument to save to file, and the resume function to restart the process as follows,
x1 = optimizableVariable('x1',[-5,5]); x2 = optimizableVariable('x2',[-5,5]); fun = @rosenbrocks; if exist('BayesoptResults.mat','file')    load('BayesoptResults.mat');    results = resume(BayesoptResults,...    'SaveFileName', 'BayesoptResults.mat', ...     'OutputFcn',{@saveToFile}); else
SEE COMPLETE ANSWER CLICK THE LINK
https://www.matlabsolutions.com/resources/can-i-have-checkpoints-in-bayesian-optimization-for-tuning-hyperparameters-of-a-neural-network-.php
0 notes
prashantgujjar · 4 years ago
Text
Data Segmentation by proportion
Hi. I want to segmentate an ECG signal recorded for 10 h from a database. Every signal have about 9 milion sample with a sample rate of 250 Hz, so about 3000 seconds. I want to segmentate this signal in time domain so I can have 5 beats in every signal. Every beat is 1.2 s so every signal segmentated will be 6 s and about 1500 samples. I need this for feature extraction and a cnn clasification. How can i extract every signal. I first throught i need to find every QRS complex, but in some cases the P wave will be higher in amplitude than R and findpeaks will get that as a peak. I tried getting every signal in an matrice but it exceeds maximum array size and it can be difficult for further processing.
[signal,Fs,tm]=rdsamp('08455'); %recording name have 2 leads sig = signal(:,1); %we will wok on the first one s= 9205760;   %samples fs = 250;     %sample rate t = floor(s/ts);     %time for the recording t_i = 0.8;      %initial time for the inteval 2/3 of first 1.2 s i = floor(t/6);    %nr of signals for j =1:i            t_f = t_i +6;   %final time for the interval    m(s,j) = sig((t_i*fs):(t_f*fs));   %I wanted to get every signal in a matrice in which every column will be a signal    t_i = (t_f*ts +1)/ts;         %initial time for further intervals end
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
you can use the function to detect positive and negative slope threshold crossing points this will give you the time index of the signal individual blocks I could try it inside your code if you could share some signal data
% demo code n=100; x=(1:n)/n; y= 0.5 + sin(20*x)+ 0.02*randn(1,n); threshold = 1; % [ind_pos,t0_pos,s0_pos,ind_neg,t0_neg,s0_neg]= crossing_V7(y,x,threshold,'linear'); % positive slope zero crossing points plot(x,y,'b',t0_pos,s0_pos,'+r',t0_neg,s0_neg,'+g','linewidth',2,'markersize',12);grid legend('signal','positive slope crossing points','negative slope crossing points');
0 notes