メインコンテンツ

結果:

Ulrich Engel
Ulrich Engel
最後のアクティビティ: 2022 年 10 月 3 日

Hello, I run a weather station that consists of several sensors. Sensor1 supplies external weather data, Sensor2 internal room data and Sensor3 particulate matter values.
Can I display the variables of all sensors in a "Weather Station" channel and display them in charts?
If so, how do I do that with ThingSpeak?
Many Thanks
Chen Lin
Chen Lin
最後のアクティビティ: 2022 年 10 月 10 日

Two fun community contests: MATLAB Mini Hack 2022 and Cody 10th Anniversary start today on Oct. 3rd!
Participants across all skill levels are welcome to join! Even if you have limited time, you still have opportunities to win as long as you participate.
Want to challenge yourself and win Amazon gift Cards and limited-edition Badges?
1. MATLAB Mini Hack 2022: Create your best entry (either a new or a remixed entry).
2. Cody 10th Anniversary: Solve your 1st Cody problem today!
If you have any questions about the contest rules or prizes, let us know by replying to this thread.
We hope you enjoy the contests, improve your MATLAB skills, and win prizes! Now, let the party begin!
Muthuserpi sasikumar
Muthuserpi sasikumar
最後のアクティビティ: 2023 年 1 月 23 日

Hi Fellow Users,
I am Muthuserpi From A begginer of Optics studio Please anyone help me how to add two diffeaction reflective grating and How to tilt and decenter in matlab simulation
Thanks And Regards
S.Muthuserpi
Just in case, I have my license of MATLAB. I just have this question and I didn't find any information. I wouldn't like to create another account, for this reason I prefer to ask here.
Adam Danz
Adam Danz
最後のアクティビティ: 2022 年 10 月 2 日

Uniform spacing and the problem of round-off error
The vector [3 4 5 6 7 8 9] is uniformly spaced with a step size of 1. So is [3 2 1 0 -1 -2] but with a step size of -1.
The vector [1 2 4 8] is not uniformly spaced.
A vector v with uniform spacing has the same finite interval or step size between consecutive elements of the vector. But sometimes round-off error poses a problem in calculating uniformity.
Take, for example, the vector produced by
format shortg
v = linspace(1,9,7)
v = 1x7
1 2.3333 3.6667 5 6.3333 7.6667 9
Linspace produces linearly spaced vectors but the intervals between elements of v, computed by diff(v), are not identical.
dv = diff(v)
dv = 1x6
1.3333 1.3333 1.3333 1.3333 1.3333 1.3333
dv == dv(1)
ans = 1×6 logical array
1 0 0 1 0 1
diff(dv)
ans = 1x5
4.4409e-16 0 -4.4409e-16 8.8818e-16 -8.8818e-16
Some extra steps are therefore necessary to set a tolerance that ignores error introduced by floating point arithmetic.
New in R2022b: isuniform
Determining uniformity of a vector became a whole lot easier in MATLAB R2022b with the new isuniform function.
isuniform returns a logical scalar indicating whether vector v is uniformly spaced within a round-off tolerance and returns the step size (or NaN if v is not uniform).
Let's look at the results for our vector v,
[tf,step] = isuniform(v)
tf = logical
1
step =
1.3333
How about non-uniformly spaced vector?
[tf,step] = isuniform(logspace(1,5,4))
tf = logical
0
step =
NaN
Give it a shot in MATLAB R2022b
  • What happens when all elements of v are equal?
  • Can you produce a vector with uniform spacing without using colons or linspace?
  • What additional steps would be needed to use isuniform with circular data?
References
This article is attached as a live script.
Always or usually. They're fun.
18%
Sometimes, some of them.
7%
Not yet, but probably will some day
25%
Never, and don't plan to.
50%
3937 票
shivaleela Patil
shivaleela Patil
最後のアクティビティ: 2022 年 12 月 11 日

Hello Community,
For E vehicle application to control the speed and torque of PMSM motor I am implementing FOC algorithm. We know that to arrive at Speed set point we have speed control loop which is outer loop, Further PI CONTROLLER of speed loop will give reference for Iq current which regulates the current using current loop. My question is 1.How to arrive at Torque set point?
2. Is speed control using FOC is enough or we should implement Torque control algorithm also?
3. should we have speed mode and Torque mode selection in case of constant speed requirement during cruise mode and high torque requirement during uphill situation respectively
4. To arrive at Torque set point what is the relation or transfer function to tune PI controller for Torque loop?
Please give your valuable inputs and answers, thanks in advance
Chen Lin
Chen Lin
最後のアクティビティ: 2022 年 10 月 8 日

Two fun community contests: MATLAB Mini Hack 2022 and Cody 10th Anniversary will start on Oct 3rd, 2022. Are you ready for the challenges and big prizes?
How to Play
1. MATLAB Mini Hack 2022 contest:
Use up to 280 characters of MATLAB code to generate an interesting image. New in 2022 contest: You'll be allowed to use functions from File Exchange entries and/or certain MathWorks toolboxes in different weeks.
2. Cody 10th Anniversary contest:
Solve at least 1 Cody problem per day during the 4-week contest period. We will reward participants with the longest streak of days of problem-solving!
Tips to Win
1. MATLAB Mini Hack 2022: Spend time creating your best work (either a new or remixed entry).
2. Cody 10th Anniversary: Make sure you start on the 1st day (Oct 3rd). This is the key if you want to win one of the grand prizes (worth marking your calendar?)
3. Act now: No matter if you want to join either the Mini Hack, Cody, or both. Start planning your strategy today.
Good luck! We hope you are the winner.
Maria SS
Maria SS
最後のアクティビティ: 2022 年 9 月 26 日

I wanted to ask that can we send bulk data through ThingSpeak ESP32 library using:
POST /channels/266256/bulk_update.csv HTTP/1.1
Host: api.thingspeak.com
Content-Type: application/x-www-form-urlencoded
time_format: relative
I saw it on mathswork "Bulk-Write CSV Data" (link: https://www.mathworks.com/help/thingspeak/bulkwritecsvdata.html)
Does ThingSpeak library supports the capability to send bulk csv data, any guidance?
Thanks and looking forward for your positive reply
Miros
Miros
最後のアクティビティ: 2022 年 9 月 26 日

Maybe %lld instead of %d?
I would like to know the maximum amount of storage space in the Data Logger.
We are thrilled to share that more than 400,000 people have subscribed to MATLAB YouTube channel to watch MATLAB and Simulink videos!🎉🙌🥳🎉🙌🥳🎉🙌🥳
The channel started way back in 2006, only one year after YouTube launched. Since then, people have spent more than 2.3 million hours watching our videos. It took us 12 years to reach 100k subscribers, two more years to get to 200k subs, and only 2 years to double that and grow to 400,000!
Did you know that in 2021, there were almost 10 million views to our videos on YouTube?
Thank you again for supporting our community inside and outside MATLAB Central!
Chen Lin
Chen Lin
最後のアクティビティ: 2022 年 11 月 1 日

You are invited to enter 2 fun community contests: MATLAB Mini Hack 2022 and Cody 10th Anniversary. The contests are designed for you to have fun, win prizes, and sharpen MATLAB skills. Participants across all skill levels are welcome to join!
How to Play
1. MATLAB Mini Hack 2022 contest:
Use up to 280 characters of MATLAB code to generate an interesting image. Sounds challenging? You can still participate by simply voting for the images you love.
2. Cody 10th Anniversary contest:
Solve at least 1 Cody problem per day during the 4-week contest period. We will reward participants with the longest streak of days of problem-solving!
Prizes
You will have opportunities to win compelling prizes, including Amazon gift cards, MathWorks T-shirts, and virtual badges. We will give out both weekly prizes and grand prizes. Check out the rules & prize section on each contest page for details.
Interested in joining? Follow the contests!
Click the ‘Follow the contests’ button to follow/register for the contest. You will get notified when the contests start. After contests start, you will also receive important announcements and prize information.
보은 이
보은 이
最後のアクティビティ: 2022 年 9 月 19 日

I have a data.
And, I want to substract the data using for.
But, I want to ignore the nan values and substract others.
For example, [1, 2, 3, NaN, 6, 9, 12, 14] ---- substract---> [1, 1, 3, 3, 2]
How can I do this?
Grace Hopper Celebration is an event that celebrates the legacy of Grace Hopper who acted as the inspiration for generations of women in tech. My female coworkers in highly accomplished technical roles will be speaking at the event. Come meet, connect and network with them at GHC22.
William Hidevik
William Hidevik
最後のアクティビティ: 2022 年 9 月 12 日

Hi guys,
I'm very new to matlab, so this might a rookie mistake. However, it seems that I have messed up some important part with the plot function. The program does not give my any kind of error messages, but still does not plot anything. What can I have done wrong and how do I fix this?
Best regards
My code:
close all
for t = -2:0.1:3
if (t<0 || t>1)
xvalue = 0;
end
if (t<= 1 && t>= 0)
xvalue = exp(2*t+1);
end
yvalue = -1*(xvalue) + exp(1);
hold on
figure(1);
plot(t, yvalue);
hold off
end
grid on;
Martin
Martin
最後のアクティビティ: 2022 年 9 月 19 日

Help us please, we need to send email after measurement from sonde (GSM report) is under limit for three days.
"React" on the limit, is non for three days under limit., and time control is days or weeks runner.
I propose trigger on time control but what is the code?
????
% Read the recent data.
moistureData = thingSpeakRead(channelID,'NumDays',3,'Fields',1); {is that right, that I read last three days measurement (3000x)?}
% Check to make sure the data was read correctly from the channel.
if isempty(moistureData)
alertBody = ' No data read from plant. ';
else
%{need if
% moistureData is for three days under limit from sonde then send
% email}
span = max(moistureData) - min(moistureData);
dryValue = span;
% Get the most recent point in the array of moisture data.
lastValue = moistureData(end);
% Set the outgoing message
if (lastValue<=dryValue)
alertBody = ' I need water! ';
elseif (lastValue>dryValue)
alertBody = ' No water needed. ';
end
really thanks so much
Congratulations, Walter, for this amazing run!
You hit 100k points on 14th Aug, 2020. So, these 25k points took just over 2 years to earn.
Thank you for your contribution to the community!
MATLAB Central Team
aptt ywgs
aptt ywgs
最後のアクティビティ: 2022 年 9 月 6 日

is there any problem today? thanks
Hi
Sent data was 4.94
{"created_at":"2022-08-28T23:38:23-04:00","entry_id":1269,"field4":"4.94"}]}
Read data was 4.00
Code:
long PHTS = ThingSpeak.readLongField(counterChannelNumber, FieldNumber4, myCounterReadAPIKey);
int statusCode = ThingSpeak.getLastReadStatus();
if (statusCode == 200)
{
Serial.print("ThingSpeak pH: ");
Serial.println(PHTS);
}
How to display 4.94 (actual data) when reading the data.
Thanks