Smoothening the data of Iv loop

I have this IV curve data. I want to make smooth for inner loop curve. can some one please suggest how I can proceed?

 Risposta accettata

Star Strider
Star Strider il 24 Nov 2020

0 voti

That looks like a hysteresis loop. See if the approach in how to find ascending and descending of hysteresis loop? will fit it and do what you want.

8 Commenti

@StarStrider
I am Trying to connect my Kyithley Nanovolmeter to my computer using NI 488.2 GPIB to USB connector. what type of driver i need ti install ? where i will get this ? do i need to install driver seperately for GPIB and My instrument ?(if this is the case then I have KUSB 488 GPIB-usb connector with me, shall I preffer that one over the Ni?). and if some one have sample code written for any of their instrument please send me that also!
Thank you in advance!!
kindly,
Somnath
I have no idea how to connect it.
I suggest that you Contact Support and ask MathWorks for help with it.
@StarStrider
Thanks for you kind suggestion. I tried myself and successfully connected the instrument.
As always, my pleasure!
I am happy that you were able to resolve it.
Apparently you have the Instrument Control Toolbox or something similar, that I do not have, so I would not have been able to help you with that particular problem. I also do not have the Keithley instrument.
Hii
can someone please suggect the modification in following code as the editior showa some warning regarding the continuously variable array.
I am trying to save data to the Table or .mat or .text file
clear B C D
for i=1:5
B(i) = rand(1,1);
C(i) = rand(1,1);
D(i) = i;
end
time = D'
current = B'
data = table(time,current)
Thanks in advance!
Somnath
As always,. my pleasure!
It is simply telling you that the code will run faster and be more efficient if you preallocate the vectors:
B = zeros(1,5); % Preallocate
C = zeros(1,5); % Preallocate
C = zeros(1,5); % Preallocate
for i=1:5
B(i) = rand;
C(i) = rand;
D(i) = i;
end
time = D'
current = B'
data = table(time,current)
Also:
clear B C D
is inefficient and so not necessary. The variables will automatically be overwritten in the loop.
Note that the loop here is not at all necessary.
This does the same thing faster and more efficiently:
B = rand(1,5);
C = rand(1,5);
D = 1:5;
The rest of the code can also be made a bit more efficient.
To force the arrays to be column vectors, regardless of their original sizes, use the (:) subscript convention:
time = D(:);
current = B(:);
data = table(time,current)
With these changes, your code is now much more efficient!
Also, while I am thinking about it, what did you do to resolve the problems with the Keithley Nanovoltmeter? That information might be helpful to anyone else who sees this.
Somnath Kale
Somnath Kale il 2 Dic 2020
Modificato: Somnath Kale il 2 Dic 2020
@Star Strider
As always,. Thank you Very much! looking forward to receive such valueble info from you!!
I just have one dobut if the size of the matrix is not known prioly then? im collecting data from instrument so sometime its more than 10000 pts. if i have given extra large matrix size my data will be zero for empty cell. and then it will be problematic while plotting. this is also may be problamatic in plotting with live charts?(not clear to me)
Answer to your Question
I follwoed the following steps to connect my instrument with GPIB:
1) install drivers for GPIB
2) Establish the connection of instrument with computer first.(Ex. in case of NI GPIB-USB conertor check the connection using Ni Max app which will be atomatically installed while installing then drivers)
3) then install the Intrument control toolbox in your matlab
4) open intrument control toolbox and checked the connection again.
5) simply copy and paste the following code in your command window. (dont forget to change the Gpib Add. of intrumnt here my device have gpib add of 12)
To connect the Nanovolmater
% Find a GPIB object.
Voltmeter = instrfind('Type', 'gpib', 'BoardIndex', 0, 'PrimaryAddress', 12, 'Tag', '');
% Create the GPIB object if it does not exist otherwise use the object that was found.
if isempty(Voltmeter)
Voltmeter = gpib('NI', 0, 12);
Status2 = "Device not found"
else
fclose(Voltmeter);
Voltmeter = Voltmeter(1);
Status2 = "Device connected"
end
% Connect to instrument object, Voltmeter
fopen(Voltmeter);
% Communicating with instrument object, Voltmeter
fprintf(Voltmeter, '*idn?');
ConnectedDevice2 = fscanf(Voltmeter)
fprintf(Voltmeter, '*rst');
6) this will do everything atomatically and reset your device if connection establish by the step 1 2 and 3 are fine
7) now your ready to communictae with your instrument. just enetr your acpi command in fprintf function.
I hope this will be really helpful even for beiginers !!
Somnath Kale —
I very much appreciate your posting that information!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Instrument Control Toolbox in Centro assistenza e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by